From 2c7956c7397a1cb1afd0765230ba5266bf22579f Mon Sep 17 00:00:00 2001 From: Tristan Van Berkom Date: Sun, 11 Jun 2017 20:53:33 +0900 Subject: [PATCH] Fix reversed parameters in link() and symlink() implementations. Yes, it is a bit strange how fusepy reverses these parameters when calling into the Operations object, but they are indeed reversed. This patch fixes the example to work correctly when symlinking or linking in the passthrough. --- passthrough.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/passthrough.py b/passthrough.py index a7c284b..67f2cbf 100755 --- a/passthrough.py +++ b/passthrough.py @@ -82,13 +82,13 @@ class Passthrough(Operations): return os.unlink(self._full_path(path)) def symlink(self, name, target): - return os.symlink(name, self._full_path(target)) + return os.symlink(target, self._full_path(name)) def rename(self, old, new): return os.rename(self._full_path(old), self._full_path(new)) def link(self, target, name): - return os.link(self._full_path(target), self._full_path(name)) + return os.link(self._full_path(name), self._full_path(target)) def utimens(self, path, times=None): return os.utime(self._full_path(path), times)