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

Allow files deleted in VS Code to be "put back" on macOS #86964

Closed
ianstormtaylor opened this issue Dec 13, 2019 · 10 comments
Closed

Allow files deleted in VS Code to be "put back" on macOS #86964

ianstormtaylor opened this issue Dec 13, 2019 · 10 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug confirmed Issue has been confirmed by VS Code Team member macos Issues with VS Code on MAC/OS X upstream Issue identified as 'upstream' component related (exists outside of VS Code) upstream-issue-linked This is an upstream issue that has been reported upstream

Comments

@ianstormtaylor
Copy link

Right now if you delete a file (eg. using Right-clickDelete) and then go to that file in the trash, there is no Put Back option.

Whereas if you delete a file anywhere else in macOS (eg. using Right-clickMove to Trash) and then find it in the trash, you'll be able to select Put Back and have it return to where it was. This is helpful when you accidentally delete something and want to restore it.

image

Is it possible for VS Code to support this?

@bpasero bpasero added bug Issue identified by VS Code Team member as probable bug confirmed Issue has been confirmed by VS Code Team member electron Issues and items related to Electron upstream Issue identified as 'upstream' component related (exists outside of VS Code) labels Dec 15, 2019
@bpasero bpasero assigned deepak1556 and unassigned bpasero Dec 15, 2019
@bpasero
Copy link
Member

bpasero commented Dec 15, 2019

I can reproduce. I suspect an issue with Electron not implementing the shell.moveItemToTrash method properly.

@bpasero bpasero added the macos Issues with VS Code on MAC/OS X label Dec 15, 2019
@SteelPhase
Copy link

SteelPhase commented Dec 18, 2019

As far as I understand, VSCode 1.41.0 uses electron v6.1.5. On macOS shell.moveItemToTrash should use MoveItemToTrash which appears to call trashItemAtURL from NSFileManager

It looks like this could potentially be a MacOS bug with trashItemAtURL

electron/electron#2001 references this problem, and a comment states that this could be a MacOS bug. That comment also references sindresorhus/macos-trash#4

@AlsoScratch
Copy link

Yikes. Have you informed Apple about it?

@AlsoScratch
Copy link

AlsoScratch commented Jan 4, 2020

Yikes. Have you informed Apple about it?

The deleted files don't even appear on my system! (10.15.2)
After visiting all the links in this issue, it appears at least 1 person has told them about it... 4 years ago.
Only trust the Finder, guys.

@tuf22191

This comment has been minimized.

@deepak1556
Copy link
Collaborator

It is tracked as a bug in the trashItemAtURL implementation which is what Electron also uses for the relevant api exposed to apps, more context in sindresorhus/macos-trash#4.

@deepak1556 deepak1556 added upstream-issue-linked This is an upstream issue that has been reported upstream and removed electron Issues and items related to Electron labels Oct 20, 2021
@PabloMontoyaUS
Copy link

Any updates?

@jedgore-facteus
Copy link

this happened to me

@GitPeterBradshaw
Copy link

Same problem with Visual Studio 2022 for Mac.

@deepak1556
Copy link
Collaborator

Closing since this a bug in the macOS API and is not actionable in the foreseeable future.

@deepak1556 deepak1556 closed this as not planned Won't fix, can't repro, duplicate, stale Dec 12, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Feb 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug confirmed Issue has been confirmed by VS Code Team member macos Issues with VS Code on MAC/OS X upstream Issue identified as 'upstream' component related (exists outside of VS Code) upstream-issue-linked This is an upstream issue that has been reported upstream
Projects
None yet
Development

No branches or pull requests

9 participants