mirror of
https://github.com/trapexit/mergerfs.git
synced 2025-02-22 08:16:40 +08:00
find functions now return errors. closes #24
This commit is contained in:
parent
8f35406000
commit
cfe7609bcd
@ -53,9 +53,9 @@ _access(const fs::SearchFunc searchFunc,
|
|||||||
int rv;
|
int rv;
|
||||||
fs::PathVector path;
|
fs::PathVector path;
|
||||||
|
|
||||||
searchFunc(srcmounts,fusepath,path);
|
rv = searchFunc(srcmounts,fusepath,path);
|
||||||
if(path.empty())
|
if(rv == -1)
|
||||||
return -ENOENT;
|
return -errno;
|
||||||
|
|
||||||
rv = ::eaccess(path[0].full.c_str(),mask);
|
rv = ::eaccess(path[0].full.c_str(),mask);
|
||||||
|
|
||||||
|
@ -48,9 +48,9 @@ _chmod(const fs::SearchFunc searchFunc,
|
|||||||
int error;
|
int error;
|
||||||
fs::PathVector paths;
|
fs::PathVector paths;
|
||||||
|
|
||||||
searchFunc(srcmounts,fusepath,paths);
|
rv = searchFunc(srcmounts,fusepath,paths);
|
||||||
if(paths.empty())
|
if(rv == -1)
|
||||||
return -ENOENT;
|
return -errno;
|
||||||
|
|
||||||
rv = -1;
|
rv = -1;
|
||||||
error = 0;
|
error = 0;
|
||||||
|
@ -50,9 +50,9 @@ _chown(const fs::SearchFunc searchFunc,
|
|||||||
int error;
|
int error;
|
||||||
fs::PathVector paths;
|
fs::PathVector paths;
|
||||||
|
|
||||||
searchFunc(srcmounts,fusepath,paths);
|
rv = searchFunc(srcmounts,fusepath,paths);
|
||||||
if(paths.empty())
|
if(rv == -1)
|
||||||
return -ENOENT;
|
return -errno;
|
||||||
|
|
||||||
rv = -1;
|
rv = -1;
|
||||||
error = 0;
|
error = 0;
|
||||||
|
@ -54,19 +54,20 @@ _create(const fs::SearchFunc searchFunc,
|
|||||||
uint64_t &fh)
|
uint64_t &fh)
|
||||||
{
|
{
|
||||||
int fd;
|
int fd;
|
||||||
|
int rv;
|
||||||
string path;
|
string path;
|
||||||
string dirname;
|
string dirname;
|
||||||
fs::PathVector createpath;
|
fs::PathVector createpath;
|
||||||
fs::PathVector existingpath;
|
fs::PathVector existingpath;
|
||||||
|
|
||||||
dirname = fs::dirname(fusepath);
|
dirname = fs::dirname(fusepath);
|
||||||
searchFunc(srcmounts,dirname,existingpath);
|
rv = searchFunc(srcmounts,dirname,existingpath);
|
||||||
if(existingpath.empty())
|
if(rv == -1)
|
||||||
return -ENOENT;
|
return -errno;
|
||||||
|
|
||||||
createPathFunc(srcmounts,dirname,createpath);
|
rv = createPathFunc(srcmounts,dirname,createpath);
|
||||||
if(createpath.empty())
|
if(rv == -1)
|
||||||
return -ENOSPC;
|
return -errno;
|
||||||
|
|
||||||
if(createpath[0].base != existingpath[0].base)
|
if(createpath[0].base != existingpath[0].base)
|
||||||
fs::clonepath(existingpath[0].base,createpath[0].base,dirname);
|
fs::clonepath(existingpath[0].base,createpath[0].base,dirname);
|
||||||
|
58
src/fs.cpp
58
src/fs.cpp
@ -490,19 +490,20 @@ namespace fs
|
|||||||
|
|
||||||
namespace find
|
namespace find
|
||||||
{
|
{
|
||||||
void
|
int
|
||||||
invalid(const vector<string> &basepaths,
|
invalid(const vector<string> &basepaths,
|
||||||
const string fusepath,
|
const string fusepath,
|
||||||
PathVector &paths)
|
PathVector &paths)
|
||||||
{
|
{
|
||||||
return;
|
return (errno = EINVAL,-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
int
|
||||||
ff(const vector<string> &basepaths,
|
ff(const vector<string> &basepaths,
|
||||||
const string fusepath,
|
const string fusepath,
|
||||||
PathVector &paths)
|
PathVector &paths)
|
||||||
{
|
{
|
||||||
|
errno = ENOENT;
|
||||||
for(vector<string>::const_iterator
|
for(vector<string>::const_iterator
|
||||||
iter = basepaths.begin(), eiter = basepaths.end();
|
iter = basepaths.begin(), eiter = basepaths.end();
|
||||||
iter != eiter;
|
iter != eiter;
|
||||||
@ -515,22 +516,20 @@ namespace fs
|
|||||||
path = fs::make_path(*iter,fusepath);
|
path = fs::make_path(*iter,fusepath);
|
||||||
rv = ::lstat(path.c_str(),&st);
|
rv = ::lstat(path.c_str(),&st);
|
||||||
if(rv == 0)
|
if(rv == 0)
|
||||||
{
|
return (paths.push_back(Path(*iter,path)),0);
|
||||||
paths.push_back(Path(*iter,path));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
int
|
||||||
ffwp(const vector<string> &basepaths,
|
ffwp(const vector<string> &basepaths,
|
||||||
const string fusepath,
|
const string fusepath,
|
||||||
PathVector &paths)
|
PathVector &paths)
|
||||||
{
|
{
|
||||||
Path fallback;
|
Path fallback;
|
||||||
|
|
||||||
|
errno = ENOENT;
|
||||||
for(vector<string>::const_iterator
|
for(vector<string>::const_iterator
|
||||||
iter = basepaths.begin(), eiter = basepaths.end();
|
iter = basepaths.begin(), eiter = basepaths.end();
|
||||||
iter != eiter;
|
iter != eiter;
|
||||||
@ -544,8 +543,7 @@ namespace fs
|
|||||||
rv = ::lstat(path.c_str(),&st);
|
rv = ::lstat(path.c_str(),&st);
|
||||||
if(rv == 0)
|
if(rv == 0)
|
||||||
{
|
{
|
||||||
paths.push_back(Path(*iter,path));
|
return (paths.push_back(Path(*iter,path)),0);
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
else if(errno == EACCES)
|
else if(errno == EACCES)
|
||||||
{
|
{
|
||||||
@ -555,12 +553,12 @@ namespace fs
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(!fallback.base.empty())
|
if(!fallback.base.empty())
|
||||||
paths.push_back(fallback);
|
return (paths.push_back(fallback),0);
|
||||||
|
|
||||||
return;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
int
|
||||||
newest(const vector<string> &basepaths,
|
newest(const vector<string> &basepaths,
|
||||||
const string fusepath,
|
const string fusepath,
|
||||||
PathVector &paths)
|
PathVector &paths)
|
||||||
@ -570,6 +568,7 @@ namespace fs
|
|||||||
vector<string>::const_iterator niter;
|
vector<string>::const_iterator niter;
|
||||||
|
|
||||||
newest = 0;
|
newest = 0;
|
||||||
|
errno = ENOENT;
|
||||||
for(vector<string>::const_iterator
|
for(vector<string>::const_iterator
|
||||||
iter = basepaths.begin(), eiter = basepaths.end();
|
iter = basepaths.begin(), eiter = basepaths.end();
|
||||||
iter != eiter;
|
iter != eiter;
|
||||||
@ -589,16 +588,17 @@ namespace fs
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(newest)
|
if(newest)
|
||||||
paths.push_back(Path(*niter,npath));
|
return (paths.push_back(Path(*niter,npath)),0);
|
||||||
|
|
||||||
return;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
int
|
||||||
all(const vector<string> &basepaths,
|
all(const vector<string> &basepaths,
|
||||||
const string fusepath,
|
const string fusepath,
|
||||||
PathVector &paths)
|
PathVector &paths)
|
||||||
{
|
{
|
||||||
|
errno = ENOENT;
|
||||||
for(vector<string>::const_iterator
|
for(vector<string>::const_iterator
|
||||||
iter = basepaths.begin(), eiter = basepaths.end();
|
iter = basepaths.begin(), eiter = basepaths.end();
|
||||||
iter != eiter;
|
iter != eiter;
|
||||||
@ -614,18 +614,20 @@ namespace fs
|
|||||||
paths.push_back(Path(*iter,path));
|
paths.push_back(Path(*iter,path));
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return paths.empty() ? -1 : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
int
|
||||||
mfs(const vector<string> &basepaths,
|
mfs(const vector<string> &basepaths,
|
||||||
const string fusepath,
|
const string fusepath,
|
||||||
PathVector &paths)
|
PathVector &paths)
|
||||||
{
|
{
|
||||||
fsblkcnt_t mfs = 0;
|
fsblkcnt_t mfs;
|
||||||
string mfspath;
|
string mfspath;
|
||||||
string fullmfspath;
|
string fullmfspath;
|
||||||
|
|
||||||
|
mfs = 0;
|
||||||
|
errno = ENOENT;
|
||||||
for(vector<string>::const_iterator
|
for(vector<string>::const_iterator
|
||||||
iter = basepaths.begin(), eiter = basepaths.end();
|
iter = basepaths.begin(), eiter = basepaths.end();
|
||||||
iter != eiter;
|
iter != eiter;
|
||||||
@ -649,14 +651,17 @@ namespace fs
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(mfs == 0)
|
||||||
|
return -1;
|
||||||
|
|
||||||
fullmfspath = fs::make_path(mfspath,fusepath);
|
fullmfspath = fs::make_path(mfspath,fusepath);
|
||||||
|
|
||||||
paths.push_back(Path(mfspath,fullmfspath));
|
paths.push_back(Path(mfspath,fullmfspath));
|
||||||
|
|
||||||
return;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
int
|
||||||
epmfs(const vector<string> &basepaths,
|
epmfs(const vector<string> &basepaths,
|
||||||
const string fusepath,
|
const string fusepath,
|
||||||
PathVector &paths)
|
PathVector &paths)
|
||||||
@ -669,6 +674,9 @@ namespace fs
|
|||||||
vector<string>::const_iterator iter = basepaths.begin();
|
vector<string>::const_iterator iter = basepaths.begin();
|
||||||
vector<string>::const_iterator eiter = basepaths.end();
|
vector<string>::const_iterator eiter = basepaths.end();
|
||||||
|
|
||||||
|
if(iter == eiter)
|
||||||
|
return (errno = ENOENT,-1);
|
||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
int rv;
|
int rv;
|
||||||
@ -709,10 +717,10 @@ namespace fs
|
|||||||
|
|
||||||
paths.push_back(Path(existingmfspath,path));
|
paths.push_back(Path(existingmfspath,path));
|
||||||
|
|
||||||
return;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
int
|
||||||
rand(const vector<string> &basepaths,
|
rand(const vector<string> &basepaths,
|
||||||
const string fusepath,
|
const string fusepath,
|
||||||
PathVector &paths)
|
PathVector &paths)
|
||||||
@ -727,6 +735,8 @@ namespace fs
|
|||||||
fusepath);
|
fusepath);
|
||||||
|
|
||||||
paths.push_back(Path(randombasepath,randomfullpath));
|
paths.push_back(Path(randombasepath,randomfullpath));
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
50
src/fs.hpp
50
src/fs.hpp
@ -49,7 +49,7 @@ namespace fs
|
|||||||
};
|
};
|
||||||
|
|
||||||
typedef vector<Path> PathVector;
|
typedef vector<Path> PathVector;
|
||||||
typedef void (*SearchFunc)(const vector<string>&,const string,PathVector&);
|
typedef int (*SearchFunc)(const vector<string>&,const string,PathVector&);
|
||||||
|
|
||||||
string dirname(const string path);
|
string dirname(const string path);
|
||||||
string basename(const string path);
|
string basename(const string path);
|
||||||
@ -112,30 +112,30 @@ namespace fs
|
|||||||
|
|
||||||
namespace find
|
namespace find
|
||||||
{
|
{
|
||||||
void invalid(const vector<string> &basepaths,
|
int invalid(const vector<string> &basepaths,
|
||||||
const string fusepath,
|
const string fusepath,
|
||||||
PathVector &paths);
|
PathVector &paths);
|
||||||
void ff(const vector<string> &basepaths,
|
int ff(const vector<string> &basepaths,
|
||||||
const string fusepath,
|
const string fusepath,
|
||||||
PathVector &paths);
|
PathVector &paths);
|
||||||
void ffwp(const vector<string> &paths,
|
int ffwp(const vector<string> &paths,
|
||||||
const string fusepath,
|
const string fusepath,
|
||||||
PathVector &rv);
|
PathVector &rv);
|
||||||
void newest(const vector<string> &paths,
|
int newest(const vector<string> &paths,
|
||||||
const string fusepath,
|
const string fusepath,
|
||||||
PathVector &rv);
|
PathVector &rv);
|
||||||
void all(const vector<string> &paths,
|
int all(const vector<string> &paths,
|
||||||
const string fusepath,
|
const string fusepath,
|
||||||
PathVector &rv);
|
PathVector &rv);
|
||||||
void mfs(const vector<string> &paths,
|
int mfs(const vector<string> &paths,
|
||||||
const string fusepath,
|
const string fusepath,
|
||||||
PathVector &rv);
|
PathVector &rv);
|
||||||
void epmfs(const vector<string> &paths,
|
int epmfs(const vector<string> &paths,
|
||||||
const string fusepath,
|
const string fusepath,
|
||||||
PathVector &rv);
|
PathVector &rv);
|
||||||
void rand(const vector<string> &paths,
|
int rand(const vector<string> &paths,
|
||||||
const string fusepath,
|
const string fusepath,
|
||||||
PathVector &rv);
|
PathVector &rv);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -73,9 +73,9 @@ _getattr(const fs::SearchFunc searchFunc,
|
|||||||
int rv;
|
int rv;
|
||||||
fs::PathVector paths;
|
fs::PathVector paths;
|
||||||
|
|
||||||
searchFunc(srcmounts,fusepath,paths);
|
rv = searchFunc(srcmounts,fusepath,paths);
|
||||||
if(paths.empty())
|
if(rv == -1)
|
||||||
return -ENOENT;
|
return -errno;
|
||||||
|
|
||||||
rv = ::lstat(paths[0].full.c_str(),&buf);
|
rv = ::lstat(paths[0].full.c_str(),&buf);
|
||||||
|
|
||||||
|
@ -109,9 +109,9 @@ _getxattr(const fs::SearchFunc searchFunc,
|
|||||||
int rv;
|
int rv;
|
||||||
fs::PathVector paths;
|
fs::PathVector paths;
|
||||||
|
|
||||||
searchFunc(srcmounts,fusepath,paths);
|
rv = searchFunc(srcmounts,fusepath,paths);
|
||||||
if(paths.empty())
|
if(rv == -1)
|
||||||
return -ENOENT;
|
return -errno;
|
||||||
|
|
||||||
if(!strcmp(attrname,"user.mergerfs.basepath"))
|
if(!strcmp(attrname,"user.mergerfs.basepath"))
|
||||||
rv = ::_getxattr_from_string(buf,count,paths[0].base);
|
rv = ::_getxattr_from_string(buf,count,paths[0].base);
|
||||||
|
@ -50,9 +50,9 @@ _link(const fs::SearchFunc searchFunc,
|
|||||||
int error;
|
int error;
|
||||||
fs::PathVector paths;
|
fs::PathVector paths;
|
||||||
|
|
||||||
searchFunc(srcmounts,from,paths);
|
rv = searchFunc(srcmounts,from,paths);
|
||||||
if(paths.empty())
|
if(rv == -1)
|
||||||
return -ENOENT;
|
return -errno;
|
||||||
|
|
||||||
rv = -1;
|
rv = -1;
|
||||||
error = 0;
|
error = 0;
|
||||||
|
@ -77,9 +77,9 @@ _listxattr(const fs::SearchFunc searchFunc,
|
|||||||
int rv;
|
int rv;
|
||||||
fs::PathVector paths;
|
fs::PathVector paths;
|
||||||
|
|
||||||
searchFunc(srcmounts,fusepath,paths);
|
rv = searchFunc(srcmounts,fusepath,paths);
|
||||||
if(paths.empty())
|
if(rv == -1)
|
||||||
return -ENOENT;
|
return -errno;
|
||||||
|
|
||||||
rv = ::llistxattr(paths[0].full.c_str(),list,size);
|
rv = ::llistxattr(paths[0].full.c_str(),list,size);
|
||||||
|
|
||||||
|
@ -58,11 +58,11 @@ _mkdir(const fs::SearchFunc searchFunc,
|
|||||||
return -EEXIST;
|
return -EEXIST;
|
||||||
|
|
||||||
dirname = fs::dirname(fusepath);
|
dirname = fs::dirname(fusepath);
|
||||||
searchFunc(srcmounts,dirname,existingpath);
|
rv = searchFunc(srcmounts,dirname,existingpath);
|
||||||
if(existingpath.empty())
|
if(rv == -1)
|
||||||
return -ENOENT;
|
return -errno;
|
||||||
|
|
||||||
createPathFunc(srcmounts,dirname,createpath);
|
rv = createPathFunc(srcmounts,dirname,createpath);
|
||||||
if(createpath[0].base != existingpath[0].base)
|
if(createpath[0].base != existingpath[0].base)
|
||||||
fs::clonepath(existingpath[0].base,createpath[0].base,dirname);
|
fs::clonepath(existingpath[0].base,createpath[0].base,dirname);
|
||||||
|
|
||||||
|
@ -60,9 +60,9 @@ _mknod(const fs::SearchFunc searchFunc,
|
|||||||
return -EEXIST;
|
return -EEXIST;
|
||||||
|
|
||||||
dirname = fs::dirname(fusepath);
|
dirname = fs::dirname(fusepath);
|
||||||
searchFunc(srcmounts,dirname,existingpath);
|
rv = searchFunc(srcmounts,dirname,existingpath);
|
||||||
if(existingpath.empty())
|
if(rv == -1)
|
||||||
return -ENOENT;
|
return -errno;
|
||||||
|
|
||||||
createPathFunc(srcmounts,dirname,createpath);
|
createPathFunc(srcmounts,dirname,createpath);
|
||||||
if(existingpath[0].base != createpath[0].base)
|
if(existingpath[0].base != createpath[0].base)
|
||||||
|
@ -49,12 +49,13 @@ _open(const fs::SearchFunc searchFunc,
|
|||||||
const int flags,
|
const int flags,
|
||||||
uint64_t &fh)
|
uint64_t &fh)
|
||||||
{
|
{
|
||||||
int fd;
|
int fd;
|
||||||
|
int rv;
|
||||||
fs::PathVector paths;
|
fs::PathVector paths;
|
||||||
|
|
||||||
searchFunc(srcmounts,fusepath,paths);
|
rv = searchFunc(srcmounts,fusepath,paths);
|
||||||
if(paths.empty())
|
if(rv == -1)
|
||||||
return -ENOENT;
|
return -errno;
|
||||||
|
|
||||||
fd = ::open(paths[0].full.c_str(),flags);
|
fd = ::open(paths[0].full.c_str(),flags);
|
||||||
if(fd == -1)
|
if(fd == -1)
|
||||||
|
@ -50,9 +50,9 @@ _readlink(const fs::SearchFunc searchFunc,
|
|||||||
int rv;
|
int rv;
|
||||||
fs::PathVector paths;
|
fs::PathVector paths;
|
||||||
|
|
||||||
searchFunc(srcmounts,fusepath,paths);
|
rv = searchFunc(srcmounts,fusepath,paths);
|
||||||
if(paths.empty())
|
if(rv == -1)
|
||||||
return -ENOENT;
|
return -errno;
|
||||||
|
|
||||||
rv = ::readlink(paths[0].full.c_str(),buf,size);
|
rv = ::readlink(paths[0].full.c_str(),buf,size);
|
||||||
if(rv == -1)
|
if(rv == -1)
|
||||||
|
@ -51,9 +51,9 @@ _removexattr(const fs::SearchFunc searchFunc,
|
|||||||
int error;
|
int error;
|
||||||
fs::PathVector paths;
|
fs::PathVector paths;
|
||||||
|
|
||||||
searchFunc(srcmounts,fusepath,paths);
|
rv = searchFunc(srcmounts,fusepath,paths);
|
||||||
if(paths.empty())
|
if(rv == -1)
|
||||||
return -ENOENT;
|
return -errno;
|
||||||
|
|
||||||
rv = -1;
|
rv = -1;
|
||||||
error = 0;
|
error = 0;
|
||||||
|
@ -50,9 +50,9 @@ _rename(const fs::SearchFunc searchFunc,
|
|||||||
string pathto;
|
string pathto;
|
||||||
fs::PathVector pathfrom;
|
fs::PathVector pathfrom;
|
||||||
|
|
||||||
searchFunc(srcmounts,from,pathfrom);
|
rv = searchFunc(srcmounts,from,pathfrom);
|
||||||
if(pathfrom.empty())
|
if(rv == -1)
|
||||||
return -ENOENT;
|
return -errno;
|
||||||
|
|
||||||
pathto = fs::make_path(pathfrom[0].base,to);
|
pathto = fs::make_path(pathfrom[0].base,to);
|
||||||
|
|
||||||
|
@ -48,9 +48,9 @@ _rmdir(const fs::SearchFunc searchFunc,
|
|||||||
int error;
|
int error;
|
||||||
fs::PathVector paths;
|
fs::PathVector paths;
|
||||||
|
|
||||||
searchFunc(srcmounts,fusepath,paths);
|
rv = searchFunc(srcmounts,fusepath,paths);
|
||||||
if(paths.empty())
|
if(rv == -1)
|
||||||
return -ENOENT;
|
return -errno;
|
||||||
|
|
||||||
rv = -1;
|
rv = -1;
|
||||||
error = 0;
|
error = 0;
|
||||||
|
@ -235,9 +235,9 @@ _setxattr(const fs::SearchFunc searchFunc,
|
|||||||
int error;
|
int error;
|
||||||
fs::PathVector paths;
|
fs::PathVector paths;
|
||||||
|
|
||||||
searchFunc(srcmounts,fusepath,paths);
|
rv = searchFunc(srcmounts,fusepath,paths);
|
||||||
if(paths.empty())
|
if(rv == -1)
|
||||||
return -ENOENT;
|
return -errno;
|
||||||
|
|
||||||
rv = -1;
|
rv = -1;
|
||||||
error = 0;
|
error = 0;
|
||||||
|
@ -50,9 +50,9 @@ _truncate(const fs::SearchFunc searchFunc,
|
|||||||
int error;
|
int error;
|
||||||
fs::PathVector paths;
|
fs::PathVector paths;
|
||||||
|
|
||||||
searchFunc(srcmounts,fusepath,paths);
|
rv = searchFunc(srcmounts,fusepath,paths);
|
||||||
if(paths.empty())
|
if(rv == -1)
|
||||||
return -ENOENT;
|
return -errno;
|
||||||
|
|
||||||
rv = -1;
|
rv = -1;
|
||||||
error = 0;
|
error = 0;
|
||||||
|
@ -48,9 +48,9 @@ _unlink(const fs::SearchFunc searchFunc,
|
|||||||
int error;
|
int error;
|
||||||
fs::PathVector paths;
|
fs::PathVector paths;
|
||||||
|
|
||||||
searchFunc(srcmounts,fusepath,paths);
|
rv = searchFunc(srcmounts,fusepath,paths);
|
||||||
if(paths.empty())
|
if(rv == -1)
|
||||||
return -ENOENT;
|
return -errno;
|
||||||
|
|
||||||
rv = -1;
|
rv = -1;
|
||||||
error = 0;
|
error = 0;
|
||||||
|
@ -50,9 +50,9 @@ _utimens(const fs::SearchFunc searchFunc,
|
|||||||
int error;
|
int error;
|
||||||
fs::PathVector paths;
|
fs::PathVector paths;
|
||||||
|
|
||||||
searchFunc(srcmounts,fusepath,paths);
|
rv = searchFunc(srcmounts,fusepath,paths);
|
||||||
if(paths.empty())
|
if(rv == -1)
|
||||||
return -ENOENT;
|
return -errno;
|
||||||
|
|
||||||
rv = -1;
|
rv = -1;
|
||||||
error = 0;
|
error = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user