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 @@
- + {{ $t('commons.button.create') }} @@ -69,7 +69,7 @@ - + {{ $t('file.upload') }} {{ $t('file.remoteFile') }} @@ -89,11 +89,11 @@ - + {{ $t('menu.terminal') }} - + {{ $t('file.paste') }} @@ -108,7 +108,7 @@
@@ -139,7 +139,7 @@
- + {{ $t('file.recycleBin') }}
@@ -149,7 +149,6 @@ @clear="search()" @keydown.enter="search()" :placeholder="$t('file.search')" - size="small" >