From f50812a9ce25c9e5211a0a168433304e4cf4a083 Mon Sep 17 00:00:00 2001 From: Antonio SJ Musumeci Date: Fri, 18 Dec 2020 15:29:36 -0500 Subject: [PATCH] dirname should not return an empty string --- src/fs_acl.cpp | 2 +- src/fs_clonepath.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/fs_acl.cpp b/src/fs_acl.cpp index 50e2795c..148f21dc 100644 --- a/src/fs_acl.cpp +++ b/src/fs_acl.cpp @@ -31,7 +31,7 @@ namespace fs dir_has_defaults(const std::string &fullpath_) { int rv; - std::string dirpath; + std::string dirpath; dirpath = fs::path::dirname(fullpath_); diff --git a/src/fs_clonepath.cpp b/src/fs_clonepath.cpp index ec71344b..9e42946a 100644 --- a/src/fs_clonepath.cpp +++ b/src/fs_clonepath.cpp @@ -73,7 +73,7 @@ namespace fs return 0; dirname = fs::path::dirname(relative_); - if(!dirname.empty()) + if(dirname != "/") { rv = fs::clonepath(fromsrc_,tosrc_,dirname,return_metadata_errors_); if(rv == -1)