moveFiles 修改回无条件 overwrite (Move 或 Rename 都会处罚冲突问题)

pull/1679/head
xkeyC 2 years ago
parent e8e38029ca
commit 42f7613bfa

@ -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,

Loading…
Cancel
Save