Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Don't try to delete entries which no longer exist#1137

Merged
winstliu merged 1 commit intomasterfrom
wl-dont-double-delete
Jun 20, 2017
Merged

Don't try to delete entries which no longer exist#1137
winstliu merged 1 commit intomasterfrom
wl-dont-double-delete

Conversation

@winstliu
Copy link
Copy Markdown
Contributor

Requirements

  • Filling out the template is required. Any pull request that does not include enough information to be reviewed in a timely manner may be closed at the maintainers' discretion.
  • All new code requires tests to ensure against regressions

Description of the Change

Do not attempt to delete files/folders that no longer exist. This can happen when:

  • The entry is deleted outside of Atom before "Move to Trash" is selected
  • A folder and one of its children are both selected for deletion, but the parent folder is deleted first

Alternate Designs

None.

Benefits

Since the file no longer exists, we don't have to try deleting it! And hence no error will be shown.

Possible Drawbacks

This won't keep track of renames.

Applicable Issues

Couldn't find any.

Additional info: the existing spec to make sure error notifications were displayed was actually using this behavior to trigger the notification. I have rewritten it to spy on the actual trash method and return false from there, tricking Tree View into thinking that the operation failed.

@winstliu winstliu merged commit 3a4d66f into master Jun 20, 2017
@winstliu winstliu deleted the wl-dont-double-delete branch June 20, 2017 03:43
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant