about 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.py16
1 files changed, 11 insertions, 5 deletions
diff --git a/ranger/core/actions.py b/ranger/core/actions.py
index fa77a497..47b15fa6 100644
--- a/ranger/core/actions.py
+++ b/ranger/core/actions.py
@@ -581,11 +581,17 @@ class Actions(FileManagerAware, EnvironmentAware, SettingsAware):
 			else:
 				descr = "moving files from: " + one_file.dirname
 			def generate():
-				for f in copied_files:
-					for _ in shutil_g.move(src=f.path,
-							dst=original_path,
-							overwrite=overwrite):
-						yield
+				null = open(os.devnull, 'w')
+				process = Popen(['mv', '--backup=existing',
+					'-t', self.env.cwd.path] + \
+							[f.path for f in copied_files],
+					stdout=null, stderr=PIPE)
+				while process.poll() is None:
+					rd, _, __ = select.select(
+							[process.stderr], [], [], 0.05)
+					if rd:
+						self.notify(process.stderr.readline(), bad=True)
+					yield
 				cwd = self.env.get_directory(original_path)
 				cwd.load_content()
 		else: