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.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/ranger/core/actions.py b/ranger/core/actions.py
index ef18a553..fa77a497 100644
--- a/ranger/core/actions.py
+++ b/ranger/core/actions.py
@@ -15,6 +15,7 @@
 
 import os
 import re
+import select
 import shutil
 import time
 from os.path import join, isdir
@@ -593,13 +594,17 @@ class Actions(FileManagerAware, EnvironmentAware, SettingsAware):
 			else:
 				descr = "copying files from: " + one_file.dirname
 			def generate():
+				null = open(os.devnull, 'w')
 				process = Popen(['cp', '--backup=existing', '--archive',
 					'-t', self.env.cwd.path] + \
 							[f.path for f in self.env.copy],
-					stdout=PIPE, stderr=PIPE)
+					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
-					time.sleep(0.05)
 				cwd = self.env.get_directory(original_path)
 				cwd.load_content()