We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f1c50e8 commit ba4ea13Copy full SHA for ba4ea13
mfusepy.py
@@ -1506,7 +1506,8 @@ def _readdir(self, path: Optional[bytes], buf, filler, offset: int, fip) -> int:
1506
if isinstance(item, bytes):
1507
name, st, offset = item, None, 0
1508
else:
1509
- name, attrs, offset = item
+ name_str, attrs, offset = item
1510
+ name = name_str.encode(self.encoding)
1511
if attrs:
1512
st = c_stat()
1513
# ONLY THE MODE IS USED BY FUSE! The caller may skip everything else.
@@ -1516,10 +1517,10 @@ def _readdir(self, path: Optional[bytes], buf, filler, offset: int, fip) -> int:
1516
1517
st = None
1518
1519
if fuse_version_major == 2:
- if filler(buf, name.encode(self.encoding), st, offset) != 0: # type: ignore
1520
+ if filler(buf, name, st, offset) != 0: # type: ignore
1521
break
1522
elif fuse_version_major == 3:
- if filler(buf, name.encode(self.encoding), st, offset, 0) != 0:
1523
+ if filler(buf, name, st, offset, 0) != 0:
1524
1525
1526
return 0
0 commit comments