about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-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: