refac
This commit is contained in:
1 parent
72951324df
commit
395098c6f1
2 files changed
+6
No files matched your search
@@ -334,6 +334,10 @@
|
||||
|
||||
if (source === destination) return;
|
||||
|
||||
// Prevent moving a folder into itself or its own subtree
|
||||
const sourceDir = source.endsWith('/') ? source : source + '/';
|
||||
if (destFolder.startsWith(sourceDir)) return;
|
||||
|
||||
const result = await moveEntry(terminal.url, terminal.key, source, destination);
|
||||
toast[result ? 'success' : 'error'](
|
||||
$i18n.t(result ? 'Moved {{name}}' : 'Failed to move {{name}}', { name: fileName })
|
||||
|
||||
Reference in new issue
Block a user