Skip to content

Commit

Permalink
hfsfuse: list xattrs for all file types when not using the user names…
Browse files Browse the repository at this point in the history
…pace
  • Loading branch information
0x09 committed Apr 20, 2024
1 parent b79c19b commit 5fe04ec
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/hfsfuse.c
Original file line number Diff line number Diff line change
Expand Up @@ -321,11 +321,13 @@ static int hfsfuse_listxattr(const char* path, char* attr, size_t size) {
return ret;

#ifdef __linux__
// only regular files can contain user namespace xattrs on Linux
struct stat st;
hfs_stat(vol,&rec,&st,HFS_DATAFORK,NULL);
if(!(S_ISREG(st.st_mode) || S_ISDIR(st.st_mode)))
return 0;
if(!strcmp("user.",XATTR_NAMESPACE_STR)) {
// only regular files can contain user namespace xattrs on Linux
struct stat st;
hfs_stat(vol,&rec,&st,HFS_DATAFORK,NULL);
if(!(S_ISREG(st.st_mode) || S_ISDIR(st.st_mode)))
return 0;
}
#endif

declare_attr("hfsfuse.record.date_created", attr, size, ret);
Expand Down

0 comments on commit 5fe04ec

Please sign in to comment.