diff --git a/index.js b/index.js index ab9edff..47b14c9 100644 --- a/index.js +++ b/index.js @@ -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'})); + } } });