Skip to content

Commit 9f23fe4

Browse files
committed
Added VFS drop support (#7)
1 parent a994295 commit 9f23fe4

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

index.js

+5
Original file line numberDiff line numberDiff line change
@@ -549,6 +549,11 @@ const createApplication = (core, proc, win, $content) => {
549549
Promise.all(files.map(upload))
550550
.then(() => refresh(files[0].name)) // FIXME: Select all ?
551551
.catch(error => dialog('error', {error, message: 'Failed to upload file(s)'}));
552+
} else if (data && data.path && data.filename) {
553+
const dest = {path: pathJoin(currentPath.path, data.filename)};
554+
vfs.copy(data, dest)
555+
.then(() => refresh(true))
556+
.catch(error => dialog('error', {error, message: 'Failed to copy file'}));
552557
}
553558
});
554559

0 commit comments

Comments
 (0)