about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--ranger/ext/shutil_generatorized.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/ranger/ext/shutil_generatorized.py b/ranger/ext/shutil_generatorized.py
index 8bf07ace..ca6be426 100644
--- a/ranger/ext/shutil_generatorized.py
+++ b/ranger/ext/shutil_generatorized.py
@@ -83,18 +83,22 @@ def copymode(src, dst):
     if hasattr(os, 'chmod'):
         st = os.stat(src)
         mode = stat.S_IMODE(st.st_mode)
-        os.chmod(dst, mode)
+        try: os.chmod(dst, mode)
+        except: pass
 
 def copystat(src, dst):
     """Copy all stat info (mode bits, atime, mtime, flags) from src to dst"""
     st = os.stat(src)
     mode = stat.S_IMODE(st.st_mode)
     if hasattr(os, 'utime'):
-        os.utime(dst, (st.st_atime, st.st_mtime))
+        try: os.utime(dst, (st.st_atime, st.st_mtime))
+        except: pass
     if hasattr(os, 'chmod'):
-        os.chmod(dst, mode)
+        try: os.chmod(dst, mode)
+        except: pass
     if hasattr(os, 'chflags') and hasattr(st, 'st_flags'):
-        os.chflags(dst, st.st_flags)
+        try: os.chflags(dst, st.st_flags)
+        except: pass
 
 
 def copy(src, dst, overwrite=False):
?h=0.5.2&id=aeb700577b5b2955c75093129e01de49b92f124f'>^
b83e7c9 ^






065da5e ^






bbdf9df ^








8e5ed2a ^

d30a6e3 ^
d30a6e3 ^
37f0114 ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74