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

The following file couldn't be moved to trash #1019

Closed
medmr1 opened this issue Jan 8, 2017 · 2 comments
Closed

The following file couldn't be moved to trash #1019

medmr1 opened this issue Jan 8, 2017 · 2 comments

Comments

@medmr1
Copy link

medmr1 commented Jan 8, 2017

Prerequisites

Description

I have a freshly installed atom.io on win7 and it can't delete files from the project folder I made, despite every user having full permissions to the folder.

Steps to Reproduce

  1. Create file in tree view
  2. attempt to delete file from tree view
  3. "The following file couldn't be moved to trash" error message

Expected behavior: File is deleted.
Actual behavior: File is not deleted, error message.
Reproduces how often: 100%

Versions

Atom : 1.12.9
Electron: 1.3.13
Chrome : 52.0.2743.82
Node : 6.5.0

Additional Information

Windows 7, Fresh install

@medmr1
Copy link
Author

medmr1 commented Jan 8, 2017

I figured it out. Enabling the recycling bin on that drive allowed me to delete the file and send it to the recycling bin.
PLEASE fix this behavior. It should not care 1 bit whether I have recycling bin enabled. It is my preference not to enable this functionality in my operating system. It should just delete the file, agnostic of any user settings like this...
I've never had another application fail to delete a file because my recycling bin was turned off, which says you're probably doing it incorrectly. Use the appropriate OS hooks for file deletion and this wouldn't be a problem.

@50Wliu
Copy link
Contributor

50Wliu commented Jan 9, 2017

Thanks for taking the time to contribute!

We noticed that this is a duplicate of #856. You may want to subscribe there for updates.

Because we treat our issues list as the Atom team's backlog, we close duplicates to focus our work and not have to touch the same chunk of code for the same reason multiple times. This is also why we may mark something as duplicate that isn't an exact duplicate but is closely related.

For information on how to use GitHub's search feature to find out if something is a duplicate before filing, see the How Can I Contribute? section of the Atom CONTRIBUTING guide.


We use Electron's shell.moveItemToTrash() function for deleting files. If you follow the link I gave you, that issue has another link to the related Electron bug. In addition, future Atom versions will give you a more helpful warning message regarding the Recycle Bin until this bug is fixed.

@50Wliu 50Wliu closed this as completed Jan 9, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants