about summary refs log tree commit diff stats
path: root/ranger/core/actions.py
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2010-05-15 23:37:16 +0200
committerhut <hut@lavabit.com>2010-05-15 23:37:16 +0200
commit572e74f28c63a2dce6268e0be3ec3df10ac58312 (patch)
tree0a0af893cfacf0d1710c76653a5ab7d6dfe41f89 /ranger/core/actions.py
parent35b72f662d50dab160dbb32705f32d34762765a1 (diff)
downloadranger-572e74f28c63a2dce6268e0be3ec3df10ac58312.tar.gz
core.actions: improved paste()
Diffstat (limited to 'ranger/core/actions.py')
-rw-r--r--ranger/core/actions.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/ranger/core/actions.py b/ranger/core/actions.py
index c61ef338..16978591 100644
--- a/ranger/core/actions.py
+++ b/ranger/core/actions.py
@@ -569,10 +569,7 @@ class Actions(FileManagerAware, EnvironmentAware, SettingsAware):
 			cwd.load_content()
 
 		original_path = self.env.cwd.path
-		try:
-			one_file = copied_files[0]
-		except:
-			one_file = None
+		one_file = copied_files[0]
 
 		if self.env.cut:
 			self.env.copy.clear()
@@ -582,7 +579,8 @@ class Actions(FileManagerAware, EnvironmentAware, SettingsAware):
 			else:
 				descr = "moving files from: " + one_file.dirname
 			obj = CommandLoader(args=['mv', '--backup=existing',
-					'-t', self.env.cwd.path] + [f.path for f in copied_files],
+					'--suffix=_', '-ft', self.env.cwd.path] + \
+					[f.path for f in copied_files],
 					descr=descr, end_hook=refresh)
 		else:
 			if len(copied_files) == 1:
@@ -590,7 +588,8 @@ class Actions(FileManagerAware, EnvironmentAware, SettingsAware):
 			else:
 				descr = "copying files from: " + one_file.dirname
 			obj = CommandLoader(args=['cp', '--backup=existing', '--archive',
-					'-t', self.env.cwd.path] + [f.path for f in self.env.copy],
+					'--suffix=_', '-frt', self.env.cwd.path] + \
+					[f.path for f in self.env.copy],
 					descr=descr, end_hook=refresh)
 
 		self.loader.add(obj)