Skip to content

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

Description

  • 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.

Activity

  1. isidorn commented on Nov 19, 2019

    @isidorn

    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.

  2. added
    under-discussion
    on Nov 19, 2019
  3. bpasero commented on Nov 19, 2019

    @bpasero

    Isidor Nikolic (@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.

  4. isidorn commented on Nov 19, 2019

    @isidorn

    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.

  5. added
    feature-request
    and removed
    under-discussion
    on Nov 19, 2019
  6. Christilut commented on Nov 26, 2019

    @Christilut

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

    VSCode 1.40.2

  7. JenChampagne commented on Dec 29, 2019

    @JenChampagne

    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.

  8. isidorn commented on Jan 27, 2020

    @isidorn
  9. added
    bug
    and removed
    feature-request
    on Jan 27, 2020
  10. Jamather commented on Jan 28, 2020

    @Jamather
    Author

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

  11. locked and limited conversation to collaborators on Mar 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugfile-explorerverified

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions