Browse Source

use eaccess to determine permissions for ffwp. closes #2

pull/36/head
Antonio SJ Musumeci 11 years ago
parent
commit
345d0bbdc4
  1. 9
      src/fs.cpp

9
src/fs.cpp

@ -221,11 +221,16 @@ namespace fs
iter = beginiter; iter != enditer; ++iter)
{
int rv;
struct stat st;
string path;
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)
return Path(*iter,path);
}

Loading…
Cancel
Save