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

Cannot delete a file when working in remote workspace (no trash available) #10

Open
fighur opened this issue Apr 21, 2023 · 3 comments
Open

Comments

@fighur
Copy link

fighur commented Apr 21, 2023

The logs show the following error:

[error] Error (FileSystemError): Unable to delete file '...' via trash because provider does not support it.
@robole
Copy link
Owner

robole commented May 1, 2023

Hi @fighur

Thanks for reporting the issue.

Can you clarify if you are working locally or remotely?

It appears there is no trash in WSL from the error you have reported.

The delete commands: File Bunny: Delete Active File and File Bunny: Delete File both use FileSystem.delete as below:

await vscode.workspace.fs.delete(selectedFileUri, { useTrash: true });

This extension was designed to make all destructive actions safe i.e enable recovery via trash for deleted files. I am reluctant to make an exception to that.

I am not a WSL user, I do not have a windows machine, so I will not be working on this. It is open to others to investigate.

Is there a way to tell that VS Code is operating in WSL?

My guess is that process.platform reports back the platform as win32. If there is not a way to tell that you are in WSL and the error is a generic FileSystemError, then it is difficult to offer different functionality for WSL.

You could just use VS Code in Windows, the functionality works as expected there.

Kind Regards,

Rob

@robole robole added more info required help wanted Extra attention is needed labels May 1, 2023
@fighur
Copy link
Author

fighur commented May 3, 2023

Hello, the WSL does have a "trash". Actually, using vscode locally within the WSL works fine. It seems to be an issue with working remotely, not specific to the WSL (microsoft/vscode#108731).

@robole
Copy link
Owner

robole commented May 3, 2023

Thanks for the update @fighur . I guess it is purely a remote issue then. If Microsoft implement the issue you mentioned, then it should close this issue. Does that summary sound correct to you?

I will update the title of this issue to reflect that.

Awaiting implementation of trash for remote environment - microsoft/vscode#108731

@robole robole changed the title Deleting does not work in WSL Cannot delete a file when working in remote workspace (trash not available) May 3, 2023
@robole robole added bug Something isn't working enhancement New feature or request awaiting issue resolution and removed help wanted Extra attention is needed bug Something isn't working more info required labels May 3, 2023
@robole robole changed the title Cannot delete a file when working in remote workspace (trash not available) Cannot delete a file when working in remote workspace May 4, 2023
@robole robole self-assigned this Nov 24, 2023
@robole robole changed the title Cannot delete a file when working in remote workspace Cannot delete a file when working in remote workspace (no trash available) Nov 24, 2023
@robole robole removed the enhancement New feature or request label Dec 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants