Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: macOS removal fallback when moveItemToTrash fails #19700

Merged
merged 3 commits into from Aug 13, 2019

Conversation

codebytere
Copy link
Member

@codebytere codebytere commented Aug 9, 2019

Description of Change

Refs #4974.

Some macOS volumes may not support a Trash folder or it may be disabled, so these methods will report failure by returning NO or nil and an NSError with NSFeatureUnsupportedError.

This enables consumers to handle this by optionally passing a boolean deleteOnFail value to indicate whether or not the item should be unilaterally deleted if the NSFileManager fails to execute trashItemAtURL.

cc @miniak @ckerr @MarshallOfSound

Checklist

Release Notes

Notes: Enable macOS users to fallback to item removal when when shell.moveItemToTrash fails.

@electron-cation electron-cation bot added the new-pr 🌱 PR opened in the last 24 hours label Aug 9, 2019
@electron-cation electron-cation bot removed the new-pr 🌱 PR opened in the last 24 hours label Aug 10, 2019
Copy link
Member

@deepak1556 deepak1556 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with api change.

shell/common/api/atom_api_shell.cc Outdated Show resolved Hide resolved
@codebytere codebytere merged commit e1824c0 into master Aug 13, 2019
@codebytere codebytere deleted the improve-trashing branch August 13, 2019 19:31
@release-clerk
Copy link

release-clerk bot commented Aug 13, 2019

Release Notes Persisted

Enable macOS users to fallback to item removal when when shell.moveItemToTrash fails.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants