about summary refs log tree commit diff stats
path: root/ranger/core/actions.py
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2011-03-22 21:21:35 +0100
committerhut <hut@lavabit.com>2011-03-22 21:21:35 +0100
commitdffc317f2df42b73304bd2119bdcfa15c88fe4eb (patch)
tree84b379182673655274caa9067a631deaab7e8806 /ranger/core/actions.py
parent96883700b683f0f99e2e6512ee5b0484e9cb1a9d (diff)
downloadranger-dffc317f2df42b73304bd2119bdcfa15c88fe4eb.tar.gz
defaults.keys: allow pasting hardlinks.
Diffstat (limited to 'ranger/core/actions.py')
-rw-r--r--ranger/core/actions.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/ranger/core/actions.py b/ranger/core/actions.py
index 8a57330b..7b721229 100644
--- a/ranger/core/actions.py
+++ b/ranger/core/actions.py
@@ -18,7 +18,7 @@ import re
 import shutil
 import string
 from os.path import join, isdir, realpath
-from os import symlink, getcwd
+from os import link, symlink, getcwd
 from inspect import cleandoc
 
 import ranger
@@ -744,6 +744,13 @@ class Actions(FileManagerAware, EnvironmentAware, SettingsAware):
 			except Exception as x:
 				self.notify(x)
 
+	def paste_hardlink(self):
+		for f in self.env.copy:
+			try:
+				link(f.path, join(getcwd(), f.basename))
+			except Exception as x:
+				self.notify(x)
+
 	def paste(self, overwrite=False):
 		"""Paste the selected items into the current directory"""
 		copied_files = tuple(self.env.copy)
' href='#n159'>159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185