Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deal with special dash paths in fuse operations #904

Merged
merged 2 commits into from Jan 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions newsfragments/904.bugfix.rst
@@ -0,0 +1 @@
Deal with special dash paths in fuse operations.
6 changes: 5 additions & 1 deletion parsec/core/mountpoint/fuse_operations.py
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