Skip to content

Commit

Permalink
Merge pull request #69 from trapexit/getxattr
Browse files Browse the repository at this point in the history
fix calling of lgetxattr. closes #68
  • Loading branch information
trapexit committed Jun 5, 2015
2 parents ffc90f5 + 45b73e5 commit 247bac7
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/getxattr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ _getxattr_user_mergerfs(const fs::Path &path,
else if(!strcmp(attrbasename,"allpaths"))
return ::_getxattr_user_mergerfs_allpaths(srcmounts,fusepath,buf,count);

return (errno=ENOATTR,-1);
return ::lgetxattr(path.full.c_str(),attrname,buf,count);
}

static
Expand All @@ -207,8 +207,7 @@ _getxattr(const fs::find::Func searchFunc,

if(!strncmp("user.mergerfs.",attrname,sizeof("user.mergerfs.")-1))
rv = _getxattr_user_mergerfs(path[0],srcmounts,fusepath,attrname,buf,count);

if(rv == -1 && errno == ENOATTR)
else
rv = ::lgetxattr(path[0].full.c_str(),attrname,buf,count);

return ((rv == -1) ? -errno : rv);
Expand Down

0 comments on commit 247bac7

Please sign in to comment.