summary refs log tree commit diff stats
path: root/ranger/core/actions.py
diff options
context:
space:
mode:
Diffstat (limited to 'ranger/core/actions.py')
-rw-r--r--ranger/core/actions.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/ranger/core/actions.py b/ranger/core/actions.py
index 58f7aa20..a13d0977 100644
--- a/ranger/core/actions.py
+++ b/ranger/core/actions.py
@@ -1258,7 +1258,11 @@ class Actions(FileManagerAware, SettingsAware):
             src = src.path
 
         try:
-            os.renames(src, dest)
+            os.makedirs(os.path.dirname(dest))
+        except OSError:
+            pass
+        try:
+            os.rename(src, dest)
         except OSError as err:
             self.notify(err)
             return False