summary refs log tree commit diff stats
path: root/ranger/ext/shutil_generatorized.py
diff options
context:
space:
mode:
Diffstat (limited to 'ranger/ext/shutil_generatorized.py')
-rw-r--r--ranger/ext/shutil_generatorized.py6
1 files changed, 1 insertions, 5 deletions
diff --git a/ranger/ext/shutil_generatorized.py b/ranger/ext/shutil_generatorized.py
index 8c699f8e..8bf07ace 100644
--- a/ranger/ext/shutil_generatorized.py
+++ b/ranger/ext/shutil_generatorized.py
@@ -306,12 +306,8 @@ def move(src, dst, overwrite=False):
 
     """
     real_dst = dst
-    if not overwrite and os.path.isdir(dst):
-        real_dst = os.path.join(dst, _basename(src))
-        if os.path.exists(real_dst):
-            raise Error("Destination path '%s' already exists" % real_dst)
     if not overwrite:
-        real_dst = get_safe_path(real_dst)
+        real_dst = get_safe_path(os.path.join(dst, _basename(src)))
     try:
         os.rename(src, real_dst)
     except OSError:
1write-int.subx?h=hlt&id=6070c23e5e1c60d3bb169e43bddfa59b1d322427'>6070c23e ^
96838051 ^










7a583220 ^
96838051 ^























































































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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122