mirror of
https://github.com/trapexit/mergerfs.git
synced 2025-03-15 02:35:12 +08:00
use eaccess to determine permissions for ffwp. closes #2
This commit is contained in:
parent
4c7095ccf6
commit
345d0bbdc4
@ -221,11 +221,16 @@ namespace fs
|
|||||||
iter = beginiter; iter != enditer; ++iter)
|
iter = beginiter; iter != enditer; ++iter)
|
||||||
{
|
{
|
||||||
int rv;
|
int rv;
|
||||||
struct stat st;
|
|
||||||
string path;
|
string path;
|
||||||
|
|
||||||
path = make_path(*iter,suffix);
|
path = make_path(*iter,suffix);
|
||||||
rv = ::lstat(path.c_str(),&st);
|
rv = ::eaccess(path.c_str(),R_OK);
|
||||||
|
if(rv == 0)
|
||||||
|
return Path(*iter,path);
|
||||||
|
rv = ::eaccess(path.c_str(),W_OK);
|
||||||
|
if(rv == 0)
|
||||||
|
return Path(*iter,path);
|
||||||
|
rv = ::eaccess(path.c_str(),X_OK);
|
||||||
if(rv == 0)
|
if(rv == 0)
|
||||||
return Path(*iter,path);
|
return Path(*iter,path);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user