You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
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
Local OS Version: Windows 10 enterprise 10.0.18363
Remote OS Version: Ubuntu 18.04 LTS
Remote Extension/Connection Type: SSH
Steps to Reproduce:
Create a file on local named "testfile" (no extension).
Connect to remote SSH server and open a folder
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)
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.
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.
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.
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.
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.
Activity
isidorn commentedon Nov 19, 2019
I am using the
fileService.copyI could pass the
overwriteflag but that is not what I want. I would expect the fileService to find a new name and copy without overwriting.bpasero commentedon Nov 19, 2019
Isidor Nikolic (@isidorn)
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 commentedon Nov 19, 2019
Ok, so the
downloadwould 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.
Christilut commentedon Nov 26, 2019
Same problem here but occurs with file extension. Tried it on multiple files and filetypes.
VSCode 1.40.2
JenChampagne commentedon Dec 29, 2019
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 commentedon Jan 27, 2020
Fixed via microsoft/vscode@50124ae
Jamather commentedon Jan 28, 2020
Thanks for the fix :) looking forward to the release.