File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -119,6 +119,7 @@ func FsMove(c *gin.Context) {
119119 req .Names [i ] = ""
120120 continue
121121 }
122+ req .Names [i ] = srcPath
122123 if ! req .Overwrite {
123124 base := stdpath .Base (srcPath )
124125 if base == "." || base == "/" {
@@ -129,12 +130,11 @@ func FsMove(c *gin.Context) {
129130 if ! req .SkipExisting {
130131 common .ErrorStrResp (c , fmt .Sprintf ("file [%s] exists" , name ), 403 )
131132 return
132- } else {
133- continue
134133 }
134+ req .Names [i ] = ""
135+ continue
135136 }
136137 }
137- req .Names [i ] = srcPath
138138 }
139139
140140 // Create all tasks immediately without any synchronous validation
@@ -222,6 +222,7 @@ func FsCopy(c *gin.Context) {
222222 req .Names [i ] = ""
223223 continue
224224 }
225+ req .Names [i ] = srcPath
225226 if ! req .Overwrite {
226227 base := stdpath .Base (srcPath )
227228 if base == "." || base == "/" {
@@ -233,11 +234,11 @@ func FsCopy(c *gin.Context) {
233234 common .ErrorStrResp (c , fmt .Sprintf ("file [%s] exists" , name ), 403 )
234235 return
235236 } else if ! req .Merge || ! res .IsDir () {
237+ req .Names [i ] = ""
236238 continue
237239 }
238240 }
239241 }
240- req .Names [i ] = srcPath
241242 }
242243
243244 // Create all tasks immediately without any synchronous validation
You can’t perform that action at this time.
0 commit comments