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

Downloading a remote file from explorer does not overwrite a local file with the same name when there is no extension in the filename. #1851

Closed
Jamather opened this issue Nov 14, 2019 · 7 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug file-explorer verified Verification succeeded
Milestone

Comments

@Jamather
Copy link

Jamather commented Nov 14, 2019

  • VSCode Version: 1.40
  • Local OS Version: Windows 10 enterprise 10.0.18363
  • Remote OS Version: Ubuntu 18.04 LTS
  • Remote Extension/Connection Type: SSH

Steps to Reproduce:

  1. Create a file on local named "testfile" (no extension).
  2. Connect to remote SSH server and open a folder
  3. Right click a file in the explorer and click download. Click on your local testfile and overwrite it through this download menu (Save as type: All Files)
  4. Observe that the contents on local haven't actually been overwritten

Repeating the above steps with the file named "testfile.txt", the overwrite actually occurs.

@isidorn
Copy link

isidorn commented Nov 19, 2019

I am using the fileService.copy
I could pass the overwrite flag but that is not what I want. I would expect the fileService to find a new name and copy without overwriting.

@isidorn isidorn added the under-discussion Issue is under discussion for relevance, priority, approach label Nov 19, 2019
@bpasero
Copy link
Member

bpasero commented Nov 19, 2019

@isidorn

I would expect the fileService to find a new name and copy without overwriting.

The file service is not the right place for that, it takes a path and does something with it, but will not start to come up with new file names if there is a conflict. You will have to come up with a filename from the outside if there is a conflict.

Think about the file service like node.js FS API. It is pretty much that.

@isidorn
Copy link

isidorn commented Nov 19, 2019

Ok, so the download would have to do something similar to the copy.
Would have to check if there are overwrites and come up with a new name.
Marking as a feature request for now and we can tackle in the future.

@isidorn isidorn added feature-request Request for new features or functionality and removed under-discussion Issue is under discussion for relevance, priority, approach labels Nov 19, 2019
@isidorn isidorn added this to the Backlog milestone Nov 19, 2019
@Christilut
Copy link

Same problem here but occurs with file extension. Tried it on multiple files and filetypes.

VSCode 1.40.2

@JenChampagne
Copy link

Same here. I was attempting to download a local copy of a build artifact through SSH remote, and couldn't understand my results at all until I realised that the file transfer was refusing to overwrite despite the dialog which asked me to confirm that I want to overwrite.

@isidorn
Copy link

isidorn commented Jan 27, 2020

Fixed via microsoft/vscode@50124ae

@isidorn isidorn closed this as completed Jan 27, 2020
@isidorn isidorn modified the milestones: Backlog, January 2020 Jan 27, 2020
@isidorn isidorn added bug Issue identified by VS Code Team member as probable bug and removed feature-request Request for new features or functionality labels Jan 27, 2020
@Jamather
Copy link
Author

Jamather commented Jan 28, 2020

Thanks for the fix :) looking forward to the release.

@RMacfarlane RMacfarlane added the verified Verification succeeded label Jan 31, 2020
@vscodebot vscodebot bot locked and limited conversation to collaborators Mar 12, 2020
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 file-explorer verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

6 participants