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

FileSystemProvider: unable to copy/move a file over an existing one #48660

Closed
bpasero opened this issue Apr 25, 2018 · 6 comments
Closed

FileSystemProvider: unable to copy/move a file over an existing one #48660

bpasero opened this issue Apr 25, 2018 · 6 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug remote Remote system operations issues verified Verification succeeded
Milestone

Comments

@bpasero
Copy link
Member

bpasero commented Apr 25, 2018

Refs: #48421

Setup:

  • clone https://github.com/bpasero/remote-fs
  • F5
  • click "Refresh" in the explorer
  • you should see the current working directory as a remote folder using the file system provider for scheme datei://

Steps

  • move or copy a file into a directory that already exists

=> an unknown error shows up
=> I would expect the typical dialog we have that asks to overwrite the target

@jrieken jrieken added the info-needed Issue requires more information from poster label Apr 25, 2018
@jrieken
Copy link
Member

jrieken commented Apr 25, 2018

I have copy and moves regular files but not folders, nor binary files. That is tracked in #41543
@bpasero what exactly are you copying and what is the error?

@bpasero
Copy link
Member Author

bpasero commented Apr 25, 2018

@jrieken this was just README.md of our vscode repo from top level into test folder where the file also exists.

@jrieken jrieken added remote Remote system operations issues and removed info-needed Issue requires more information from poster labels Apr 25, 2018
@jrieken
Copy link
Member

jrieken commented Apr 25, 2018

ok, understood. @bpasero is the IFileService contract that it should signal the existence of the destination? I was assuming that the command/action makes sure everything is prepared correctly and then call the service with override set accordingly. Is the expectation that the service shows the prompt?

@bpasero
Copy link
Member Author

bpasero commented Apr 25, 2018

@jrieken contract would be that the file service signals this fact via FILE_MOVE_CONFLICT which will bring up the dialog (in the explorer from the DND operation). And then if confirmed, moveFile or copyFile with overwrite: true is called.

@jrieken jrieken added this to the April 2018 milestone Apr 25, 2018
@jrieken
Copy link
Member

jrieken commented Apr 25, 2018

maybe April...

jrieken added a commit that referenced this issue Apr 26, 2018
@jrieken
Copy link
Member

jrieken commented Apr 26, 2018

This now works for move, for copy I seem to always get a different name from the action anyways, e.g. foo.1.ts instead of foo.ts. That seams to be the standard behaviour and nothing special to remote resources. Important is that this requires the file system provider to behave correctly, e.g it must throw FileExist-errors when creating a file with the overwrite option.

@jrieken jrieken closed this as completed Apr 26, 2018
@bpasero bpasero added bug Issue identified by VS Code Team member as probable bug verified Verification succeeded labels Apr 26, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators Jun 10, 2018
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 remote Remote system operations issues verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

2 participants