termux-packages/packages/ranger/ranger-core-actions.py.patch

31 lines
1.2 KiB
Diff
Raw Normal View History

2018-09-15 21:57:23 +02:00
diff -u -r ../ranger-1.9.2/ranger/core/actions.py ./ranger/core/actions.py
--- ../ranger-1.9.2/ranger/core/actions.py 2018-09-09 19:51:55.000000000 +0000
+++ ./ranger/core/actions.py 2018-09-15 19:52:46.949144012 +0000
2018-01-29 10:38:31 +01:00
@@ -7,7 +7,7 @@
import codecs
import os
2018-09-15 21:57:23 +02:00
-from os import link, symlink, listdir, stat
+from os import symlink, listdir, stat
2018-01-29 10:38:31 +01:00
from os.path import join, isdir, realpath, exists
import re
import shlex
2018-09-15 21:57:23 +02:00
@@ -1513,7 +1513,7 @@
2018-01-29 10:38:31 +01:00
for fobj in self.copy_buffer:
new_name = next_available_filename(fobj.basename)
try:
2018-09-15 21:57:23 +02:00
- link(fobj.path, join(self.fm.thisdir.path, new_name))
+ symlink(fobj.path, join(self.fm.thisdir.path, new_name))
2018-01-29 10:38:31 +01:00
except OSError as ex:
self.notify('Failed to paste hardlink: View log for more info',
bad=True, exception=ex)
2018-09-15 21:57:23 +02:00
@@ -1538,7 +1538,7 @@
else:
if not exists(target_path) \
2018-01-29 10:38:31 +01:00
or stat(source_path).st_ino != stat(target_path).st_ino:
- link(source_path,
+ symlink(source_path,
2018-01-29 10:38:31 +01:00
next_available_filename(target_path))
def paste(self, overwrite=False, append=False):