Skip to content

Commit 0d2e488

Browse files
committed
Fixed xattrs parsing in xroot
1 parent 9c40baa commit 0d2e488

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/core/xrootiface.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ def statx(endpoint, fileref, userid, versioninv=1):
243243
statxdata = {k.decode(): v.decode().strip('"') for k, v in
244244
[kv for kv in kvlist if len(kv) == 2 and kv[0].find(b'xattr') == -1]}
245245
for ikv, kv in enumerate(kvlist):
246-
if len(kv) == 2 and kv[0].find(b'xattrn') and kv[1].find(b'user.'):
246+
if len(kv) == 2 and kv[0].find(b'xattrn') == 0 and kv[1].find(b'user.') == 0:
247247
# we found an user xattr: use it as key, where the value is on the next element (with kv[0] = 'xattrv')
248248
xattrs[kv[1].decode().strip('user.')] = kvlist[ikv+1][1].decode()
249249

0 commit comments

Comments
 (0)