mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-10-26 19:01:56 -04:00
add user.mergerfs.allpaths and user.mergerfs.relpath to getxattr
This commit is contained in:
parent
2e95c6e78e
commit
d30cae217b
4 changed files with 78 additions and 7 deletions
21
src/fs.cpp
21
src/fs.cpp
|
|
@ -162,6 +162,27 @@ namespace fs
|
|||
fusepath);
|
||||
}
|
||||
|
||||
void
|
||||
findallfiles(const vector<string> &srcmounts,
|
||||
const string &fusepath,
|
||||
vector<string> &paths)
|
||||
{
|
||||
for(vector<string>::const_iterator
|
||||
iter = srcmounts.begin(), eiter = srcmounts.end();
|
||||
iter != eiter;
|
||||
++iter)
|
||||
{
|
||||
int rv;
|
||||
string fullpath;
|
||||
struct stat st;
|
||||
|
||||
fullpath = fs::make_path(*iter,fusepath);
|
||||
rv = ::lstat(fullpath.c_str(),&st);
|
||||
if(rv == 0)
|
||||
paths.push_back(fullpath);
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
listxattr(const string &path,
|
||||
vector<char> &attrs)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue