diff --git a/backend/utils/files/file_op.go b/backend/utils/files/file_op.go index c7c056492..3f95b4ac8 100644 --- a/backend/utils/files/file_op.go +++ b/backend/utils/files/file_op.go @@ -288,6 +288,9 @@ func (f FileOp) Cut(oldPaths []string, dst, name string, cover bool) error { var dstPath string if name != "" { dstPath = filepath.Join(dst, name) + if f.Stat(dstPath) { + dstPath = dst + } } else { base := filepath.Base(p) dstPath = filepath.Join(dst, base) diff --git a/frontend/src/views/host/file-management/index.vue b/frontend/src/views/host/file-management/index.vue index 9761d4396..c81db005a 100644 --- a/frontend/src/views/host/file-management/index.vue +++ b/frontend/src/views/host/file-management/index.vue @@ -52,7 +52,7 @@