Skip to content

Commit

Permalink
Deal with special dash paths in fuse operations (PR #904)
Browse files Browse the repository at this point in the history
  • Loading branch information
vxgmichel committed Jan 6, 2020
2 parents 81d5577 + 057df54 commit c364d16
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions newsfragments/904.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Deal with special dash paths in fuse operations.
6 changes: 5 additions & 1 deletion parsec/core/mountpoint/fuse_operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,11 @@ def __init__(self, event_bus, fs_access):
self._need_exit = False

def __call__(self, name, path, *args, **kwargs):
path = FsPath(path)
# The path argument might be None or "-" in some special cases
# related to `release` and `releasedir` (when the file descriptor
# is available but the corresponding path is not). In those cases,
# we can simply ignore the path.
path = FsPath(path) if path not in (None, "-") else None
with translate_error(self.event_bus, name, path):
return super().__call__(name, path, *args, **kwargs)

Expand Down

0 comments on commit c364d16

Please sign in to comment.