summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2010-04-26 10:42:22 +0200
committerhut <hut@lavabit.com>2010-04-26 20:56:27 +0200
commitf31ad6f10fa5d3198b97bd4bcc57e4cf659bd1ca (patch)
tree73a1a29c5a34dadd9fc7a2c83e891980b7fd0cd9
parentdf031abce3bd8cf9a31815b1e7bf148dde7ed69e (diff)
downloadranger-f31ad6f10fa5d3198b97bd4bcc57e4cf659bd1ca.tar.gz
shutil_generatorized: fixed bad destination name on move+overwrite
-rw-r--r--ranger/ext/shutil_generatorized.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/ranger/ext/shutil_generatorized.py b/ranger/ext/shutil_generatorized.py
index a02ccfe4..436d2cb7 100644
--- a/ranger/ext/shutil_generatorized.py
+++ b/ranger/ext/shutil_generatorized.py
@@ -273,9 +273,9 @@ def move(src, dst, overwrite=False):
     the issues this implementation glosses over.
 
     """
-    real_dst = dst
+    real_dst = os.path.join(dst, _basename(src))
     if not overwrite:
-        real_dst = get_safe_path(os.path.join(dst, _basename(src)))
+        real_dst = get_safe_path(real_dst)
     try:
         os.rename(src, real_dst)
     except OSError: