Skip to content

Commit

Permalink
Ignore equal drops (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
andersevenrud committed Dec 10, 2019
1 parent 750a091 commit a0cc43b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -551,9 +551,11 @@ const createApplication = (core, proc, win, $content) => {
.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'}));
if (dest.path !== data.path) {
vfs.copy(data, dest)
.then(() => refresh(true))
.catch(error => dialog('error', {error, message: 'Failed to copy file'}));
}
}
});

Expand Down

0 comments on commit a0cc43b

Please sign in to comment.