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)