liximomo/vscode-sftp

Filename cache maybe?

Feelosov opened this issue · 5 comments

Hi!

Im not sure is that bug of your plugin, but lets think about this, because my tech-support think that it maybe cache.

Sometimes, when i press Ctrl+S for save and autoupload file via SFTP to server, i get on server file with lowercase filename, but on my PC i have file with uppercase name. Why: if at first time a saved my file with name "class_test.php", so after change name to "Class_test.php" i again get name from first time saving - "class_test.ph".

Try to reproduce the problem like this:

  1. Create a file on your PC with a name beginning with a small letter, such as 'class_test.php'.
  2. Open this file in VS Code.
  3. Save it from VS Code by uploading via FTP.
  4. Delete the created file manually from the server's file manager.
  5. Return to the file opened in the IDE and change the first letter so that the first letter is capitalized, for example 'Class_test.php'.
  6. Save the file from the IDE with a new name.
  7. You will see that the file is saved on the server with the name 'class_test.php' entered for the first time.

Thanks

Using "Upload" from context-menu works fine, Ctrl+S send wrong file.

Thanks for the answer.

Yes, you can do this, but it's not convenient: you have to pick up the mouse, aim at the file, search for the desired item in the context menu. :-)

Is this a program error or a plugin? If in a plugin, is it possible to put in a plan for a fix?

i meet the same problem.

i use this package.
https://github.com/Natizyskunk/vscode-sftp

cc: @Natizyskunk
Did you encounter this problem?

--- found.
Natizyskunk#24

i meet the same problem.

Oh yeah! This is already half the solution. Half - because it saves both versions of the file: both with a capital letter and with a small letter.

Using "Upload" from context-menu works fine, Ctrl+S send wrong file.

Solution find!

{
    "name": "XXX",
    "host": "XXX",
    "protocol": "sftp",
    "port": 22,
    "username": "XXX",
    "password": "XXX",
    "remotePath": "XXX",
    "watcher": {               // add this with below parameters
        "files": "**/*",
        "autoDelete": true,
        "autoUpload": true        
    },
    "uploadOnSave": false     // set to false
}