filemanager: allow pasting on non-folders to cwd

This commit is contained in:
Johannes Zellner
2023-06-30 14:14:51 +02:00
parent d2b39351b8
commit 5433552710
+1 -1
View File
@@ -349,7 +349,7 @@ export default {
async pasteHandler(target) {
if (!this.clipboard.files || !this.clipboard.files.length) return;
const targetPath = target ? sanitize(this.cwd + '/' + target.fileName) : this.cwd;
const targetPath = (target && target.isDirectory) ? sanitize(this.cwd + '/' + target.fileName) : this.cwd;
await this.directoryModel.paste(targetPath, this.clipboard.action, this.clipboard.files);
this.clipboard = {};