Skip to content

Commit

Permalink
Added VFS drop support (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
andersevenrud committed Dec 7, 2019
1 parent a994295 commit 9f23fe4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -549,6 +549,11 @@ const createApplication = (core, proc, win, $content) => {
Promise.all(files.map(upload))
.then(() => refresh(files[0].name)) // FIXME: Select all ?
.catch(error => dialog('error', {error, message: 'Failed to upload file(s)'}));
} else if (data && data.path && data.filename) {
const dest = {path: pathJoin(currentPath.path, data.filename)};
vfs.copy(data, dest)
.then(() => refresh(true))
.catch(error => dialog('error', {error, message: 'Failed to copy file'}));
}
});

Expand Down

0 comments on commit 9f23fe4

Please sign in to comment.