mirror of
https://github.com/trapexit/mergerfs.git
synced 2025-01-20 01:52:46 +08:00
Merge pull request #856 from trapexit/dirname
dirname should not return an empty string
This commit is contained in:
commit
2e4c6c5fd1
|
@ -31,7 +31,7 @@ namespace fs
|
||||||
dir_has_defaults(const std::string &fullpath_)
|
dir_has_defaults(const std::string &fullpath_)
|
||||||
{
|
{
|
||||||
int rv;
|
int rv;
|
||||||
std::string dirpath;
|
std::string dirpath;
|
||||||
|
|
||||||
dirpath = fs::path::dirname(fullpath_);
|
dirpath = fs::path::dirname(fullpath_);
|
||||||
|
|
||||||
|
|
|
@ -73,7 +73,7 @@ namespace fs
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
dirname = fs::path::dirname(relative_);
|
dirname = fs::path::dirname(relative_);
|
||||||
if(!dirname.empty())
|
if(dirname != "/")
|
||||||
{
|
{
|
||||||
rv = fs::clonepath(fromsrc_,tosrc_,dirname,return_metadata_errors_);
|
rv = fs::clonepath(fromsrc_,tosrc_,dirname,return_metadata_errors_);
|
||||||
if(rv == -1)
|
if(rv == -1)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user