about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authortoonn <toonn@toonn.io>2019-05-28 15:25:28 +0200
committertoonn <toonn@toonn.io>2019-05-28 15:25:28 +0200
commite2df4002cedf71075de9c98c1624113afec9c5f7 (patch)
tree269a86fc14cbbe9d9b93145c0e09543d43b6942f
parent3f37523ade476ce73160feb79d6002734cf304d8 (diff)
downloadranger-e2df4002cedf71075de9c98c1624113afec9c5f7.tar.gz
Atone for @Vifon's rash fixing of bugs
This required ritual sacrifice of many CPU cycles to appease the
Almighty PyLint.
-rw-r--r--ranger/core/loader.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/ranger/core/loader.py b/ranger/core/loader.py
index ac31abeb..26b729b6 100644
--- a/ranger/core/loader.py
+++ b/ranger/core/loader.py
@@ -101,9 +101,10 @@ class CopyLoader(Loadable, FileManagerAware):  # pylint: disable=too-many-instan
                     if path == fobj.path or str(path).startswith(fobj.path):
                         tag = self.fm.tags.tags[path]
                         self.fm.tags.remove(path)
-                        self.fm.tags.tags[
-                            path.replace(fobj.path, os.path.join(self.original_path, fobj.basename))
-                        ] = tag
+                        new_path = path.replace(
+                            fobj.path,
+                            os.path.join(self.original_path, fobj.basename))
+                        self.fm.tags.tags[new_path] = tag
                         self.fm.tags.dump()
                 n = 0
                 for n in shutil_g.move(src=fobj.path, dst=self.original_path,