Skip to content

Commit

Permalink
fix calling of lgetxattr. closes #68
Browse files Browse the repository at this point in the history
  • Loading branch information
trapexit committed Jun 4, 2015
1 parent ffc90f5 commit 45b73e5
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 45b73e5

Please sign in to comment.