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

File service: unable to move/copy same path #75825

Closed
isidorn opened this issue Jun 20, 2019 · 3 comments
Closed

File service: unable to move/copy same path #75825

isidorn opened this issue Jun 20, 2019 · 3 comments
Assignees
Labels
debt Code quality issues file-io File I/O help wanted Issues identified as good community contribution opportunities linux Issues with VS Code on Linux
Milestone

Comments

@isidorn
Copy link
Contributor

isidorn commented Jun 20, 2019

  1. Linux
  2. Trigger rename a file in the explorer
  3. Click anywhere else while the rename box is shown. Notice error in the console

Unable to move/copy when source path is equal or parent of target path: Error: Unable to move/copy when source path is equal or parent of target path
The issue is that the explorer calls textFileService.move(stat.resource, targetResource) where both resources are the same.
The fileService treats this as a no-op on OS X and Win. But throws on linux.

@bpasero What is the proper behavior, that it is always a no-op, or you always throw so I put a check in the action.

fyi @joaomoreno

@isidorn isidorn added the linux Issues with VS Code on Linux label Jun 20, 2019
@isidorn isidorn mentioned this issue Jun 20, 2019
@bpasero bpasero added debt Code quality issues file-io File I/O help wanted Issues identified as good community contribution opportunities labels Jun 24, 2019
@bpasero bpasero added this to the June 2019 milestone Jun 24, 2019
@bpasero
Copy link
Member

bpasero commented Jun 24, 2019

@isidorn wanna do this? I think it is somewhere here:

private async doValidateMoveCopy(sourceProvider: IFileSystemProvider, source: URI, targetProvider: IFileSystemProvider, target: URI, overwrite?: boolean): Promise<{ exists: boolean, isCaseChange: boolean }> {

@isidorn
Copy link
Contributor Author

isidorn commented Jun 24, 2019

Yeah. I will look into this. Thanks for pointer.

@isidorn
Copy link
Contributor Author

isidorn commented Jun 26, 2019

Decided to fix this on the explorer side - felt more natural there.
I simply do not call into your service when the resources are the same

@vscodebot vscodebot bot locked and limited conversation to collaborators Aug 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
debt Code quality issues file-io File I/O help wanted Issues identified as good community contribution opportunities linux Issues with VS Code on Linux
Projects
None yet
Development

No branches or pull requests

2 participants