Skip to content

Commit

Permalink
dirname should not return an empty string
Browse files Browse the repository at this point in the history
  • Loading branch information
trapexit committed Dec 18, 2020
1 parent 861edff commit f50812a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/fs_acl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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_);

Expand Down
2 changes: 1 addition & 1 deletion src/fs_clonepath.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit f50812a

Please sign in to comment.