From 6b8e6459d4e61ae602b23cd18f04882de854d266 Mon Sep 17 00:00:00 2001 From: Antonio SJ Musumeci Date: Mon, 1 Sep 2025 19:25:07 -0500 Subject: [PATCH] fs_clonepath.cpp --- src/fs_clonepath.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/fs_clonepath.cpp b/src/fs_clonepath.cpp index b5fabde9..5827597e 100644 --- a/src/fs_clonepath.cpp +++ b/src/fs_clonepath.cpp @@ -27,13 +27,10 @@ #include "fs_xattr.hpp" #include "ugid.hpp" -#include "fmt/core.h" - #include -#include using std::string; -namespace stdfs = std::filesystem; + static bool @@ -68,13 +65,13 @@ fs::clonepath(const string &srcpath_, struct stat st; string dstpath; string srcpath; - stdfs::path dirname; + string dirname; if((relpath_ == NULL) || (relpath_[0] == '\0')) return 0; - dirname = stdfs::path{relpath_}.parent_path(); - if(dirname != dirname.root_path()) + dirname = fs::path::dirname(relpath_); + if(dirname != "/") { rv = fs::clonepath(srcpath_,dstpath_,dirname,return_metadata_errors_); if(rv < 0)