summary refs log tree commit diff stats
path: root/ranger
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2010-03-12 20:59:24 +0100
committerhut <hut@lavabit.com>2010-03-12 21:50:54 +0100
commitd01a6613f2a34c6fb5b92c1d661f9ab32a7c2086 (patch)
treed64c4df4113b415de3dbdaf1a0c36f696d3b5c93 /ranger
parentc9c7a8335d115d62312d31f95397f956488e8c7a (diff)
downloadranger-d01a6613f2a34c6fb5b92c1d661f9ab32a7c2086.tar.gz
fixed shutli_generatorized.move()
Diffstat (limited to 'ranger')
-rw-r--r--ranger/ext/shutil_generatorized.py6
1 files changed, 1 insertions, 5 deletions
diff --git a/ranger/ext/shutil_generatorized.py b/ranger/ext/shutil_generatorized.py
index 8c699f8e..8bf07ace 100644
--- a/ranger/ext/shutil_generatorized.py
+++ b/ranger/ext/shutil_generatorized.py
@@ -306,12 +306,8 @@ def move(src, dst, overwrite=False):
 
     """
     real_dst = dst
-    if not overwrite and os.path.isdir(dst):
-        real_dst = os.path.join(dst, _basename(src))
-        if os.path.exists(real_dst):
-            raise Error("Destination path '%s' already exists" % real_dst)
     if not overwrite:
-        real_dst = get_safe_path(real_dst)
+        real_dst = get_safe_path(os.path.join(dst, _basename(src)))
     try:
         os.rename(src, real_dst)
     except OSError: