mirror of
https://github.com/halejohn/Cloudreve.git
synced 2026-01-26 09:34:57 +08:00
moveFiles 修改回无条件 overwrite (Move 或 Rename 都会处罚冲突问题)
This commit is contained in:
@@ -38,13 +38,14 @@ func moveFiles(ctx context.Context, fs *filesystem.FileSystem, src FileInfo, dst
|
||||
fileIDs = []uint{src.(*model.File).ID}
|
||||
}
|
||||
|
||||
if overwrite {
|
||||
if err := _checkOverwriteFile(ctx, fs, src, dst); err != nil {
|
||||
return http.StatusInternalServerError, err
|
||||
}
|
||||
}
|
||||
|
||||
// 判断是否需要移动
|
||||
if src.GetPosition() != path.Dir(dst) {
|
||||
if overwrite {
|
||||
if err := _checkOverwriteFile(ctx, fs, src, dst); err != nil {
|
||||
return http.StatusInternalServerError, err
|
||||
}
|
||||
}
|
||||
err = fs.Move(
|
||||
ctx,
|
||||
folderIDs,
|
||||
|
||||
Reference in New Issue
Block a user