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

Add a setting to bypass recycle bin or detect if recycle bin is supported #14638

Closed
fenying opened this issue Oct 28, 2016 · 9 comments
Closed
Assignees
Labels
feature-request Request for new features or functionality file-io File I/O verification-needed Verification of issue is requested verified Verification succeeded

Comments

@fenying
Copy link

fenying commented Oct 28, 2016

  • VSCode Version: 1.6.1
  • OS Version: Windows 8.1 Pro

Steps to Reproduce:

  1. Select the menu File-OpenFolder, to open a folder on a portable storage device, such as a USB Disk.
  2. Remove a file from the opened folder, then it asks whether move the file into recyclebin or not.
  3. If you choose "Move it to recyclebin", it will fail, because there is no recyclebin for a USB Disk.

Suggest:

Add an option disableRecycleBin in file .vscode/settings.json, so that we can tell the VSCode not to use recyclebin for a specific project/folder.

@bpasero bpasero changed the title RecycleBin warnings for portable storage devices. Add a setting to bypass recycle bin Oct 28, 2016
@bpasero bpasero added feature-request Request for new features or functionality file-explorer Explorer widget issues labels Oct 28, 2016
@bpasero bpasero changed the title Add a setting to bypass recycle bin Add a setting to bypass recycle bin or detect if recycle bin is supported Oct 28, 2016
@bpasero
Copy link
Member

bpasero commented Oct 28, 2016

A setting might be the worse user experience. Maybe we could detect if the recycle bin is supported before trying to use it. This would require API in Electron though.

As a workaround we added support in 1.6.x release to bypass the trash if you press and hold the shift key while invoking the delete. See #9354

@fenying
Copy link
Author

fenying commented Oct 29, 2016

@bpasero Great. Anyway if it could be solved will be okay. ^_^

@PunchyRascal
Copy link

I would add, that I personally view the recycle bin to be an OS feature, not something dependent on the type of drive where I delete (btw - why don't e.g. USB stics or remote drives "support" recycling?). Anyway, I see these options:

  1. delete to recycle bin, if not supported by the drive, use system drive bin
  2. keep as is, but introduce settings to disable recycle bin

@weeblr
Copy link

weeblr commented Dec 19, 2016

Hi

As mentioned here #329 (comment) some times ago, there is another issue with moving to recycle bin when you use code in a portable way (ie with custom settings and extensions dir).

So a CLI option to disable recycle bin entirely, even if OS provides support for recycling still does make sense IMHO

Cheers

@Inirit
Copy link

Inirit commented Jul 28, 2017

The behavior described in this issue also repros if the recycling bin is outright disabled. This was previously reported in #1646, but that issue was considered a dupe and was closed. However, it seems either this behavior has regressed or #1646 wasn't actually a dupe as I'm hitting this issue with a 100% repro rate.

My setup:

  • VSCode 1.14.2
  • Windows 10 Pro Insider Preview build 16232

Now to inject my opinion, I would absolutely expect any app running on Windows to respect the configuration of the underlying OS. I'm not sure what the reasoning is for VSCode to have special handling for the actual deletion of files and why it can't let the OS handle it, but overriding the file system to force an unsupported condition makes for an awkward situation. Admittedly, this particular bug is very small and the workarounds are quick, but the little annoyances add up and I'd prefer not to fight muscle memory to use a different key combo every time I want to delete a file.

If this is something that isn't considered high enough priority to be fixed in the near future, then I would be very much in favor of a setting to toggle the recycling bin off. From a user experience perspective, it may still be a workaround but it's a workaround I would only have to apply once and therefore I would consider this to be a preferable workaround compared to using shift-delete.

@kevtainer
Copy link

this happens 100% of the time when using a remote file system such as NFS.

@isidorn isidorn added file-io File I/O and removed file-explorer Explorer widget issues labels Nov 17, 2017
@bpasero bpasero removed their assignment Nov 17, 2017
@bpasero
Copy link
Member

bpasero commented Mar 3, 2018

The experience with upcoming 1.21 release is nicer, I think a setting is actually not needed. Just set "explorer.confirmDelete": false and VS Code will try to move to trash without asking. If that fails, you now get a modal dialog like this one asking to delete permanently:

image

Just hit enter and the file should be gone.

I am not feeling too good about a solution where VS Code would delete something permanently without asking, so I think this solution with one prompt is better compared to before where you had to click the notification message action using the mouse.

@z16
Copy link

z16 commented Jun 2, 2018

I can't speak for others and I suspect I'm not in a majority, but I feel like a setting for that would be warranted regardless of whether the recycle bin exists (or is enabled) or not. I just want to permanently delete by default, without disabling the recycle bin system-wide.

It's bad enough (for me) that the OS by default moves to the recycle bin on delete and I have to shift+delete every time, I would like to at least be able to configure the editor I use to fit my needs. Even if it's not the default option, because, like I said, I suspect I'm in the minority here. But this should be easy enough to set up that I can't see a reason not to do it.

@bpasero bpasero self-assigned this Sep 12, 2018
@bpasero bpasero added this to the September 2018 milestone Sep 12, 2018
@bpasero bpasero added the verification-needed Verification of issue is requested label Sep 12, 2018
@bpasero
Copy link
Member

bpasero commented Sep 12, 2018

Verification: There is now a setting files.enableTrash to control this. If disabled:

  • the explorer will show "Delete Permanently" in the context menu
  • the delete key will delete permanently from the explorer

@mjbvz mjbvz added the verified Verification succeeded label Sep 25, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators Oct 27, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality file-io File I/O verification-needed Verification of issue is requested verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

9 participants