Natizyskunk / vscode-sftp

Super fast sftp/ftp extension for VS Code
Other
389 stars 75 forks source link

No such file or directory with latest 'useTempFile' option #39

Closed Adrianilloo closed 3 years ago

Adrianilloo commented 3 years ago

Recently syncing to my remote server started caused "missing file or directory" errors, where the local files existed. I went to check my remote machine dirs and noticed .new files being created, which I didn't see before. Upon quick checking repository changes I noticed the recent useTempFile setting, which apparently is what allowed these new temp files. My intuition told me to disable it (assumed default value was true) and that has fixed it.

The problematic behaviour shouldn't happen when the setting is enabled.

FM-O commented 3 years ago

Related issue #36

Natizyskunk commented 3 years ago

Could you try new release and tell me if the bug has been fixed please ?

Adrianilloo commented 3 years ago

Alright. Seems to work fine now. Tried re-enabling the option explicitly as I found it has recently been defaulted off, and results were successful. I could notice the .new files being created and then destroyed upon copy completion on my server by immediately refreshing the list through Filezilla during syncing. Behaviour looks fine with the setting disabled as well.

P.S. You might need to update the change on the wiki as well?

Thank you!

Adrianilloo commented 3 years ago

Extension might still not sanitized yet. I think a certain failure case is still happening. Apparently only when automatic, periodic syncing happens, the same kind of errors arise:

at TCP.onStreamRead (internal/stream_base_commons.js:188:23) when local ➞ remote d:\Source\MyHL2MPServers\server_base\hl2mp\addons\sourcemod\configs\saysounds.base.cfg
[08-24 20:15:31] [error] Error: No such file
    at 101 (c:\Users\Adrián\.vscode\extensions\natizyskunk.sftp-1.15.2\node_modules\ssh2\lib\protocol\SFTP.js:2471:19)
    at SFTP.push (c:\Users\Adrián\.vscode\extensions\natizyskunk.sftp-1.15.2\node_modules\ssh2\lib\protocol\SFTP.js:271:11)
    at CHANNEL_DATA (c:\Users\Adrián\.vscode\extensions\natizyskunk.sftp-1.15.2\node_modules\ssh2\lib\client.js:505:23)

This was not happening before, until 1.14.0 at least. You might want to check it, not sure if it depends on concrete files setup.

Adrianilloo commented 3 years ago

@Natizyskunk You might close this. Haven't had latest reported issue on automatic re-synchronization activations lately again.

Natizyskunk commented 3 years ago

@Adrianilloo, Perfect, I'm glad to hear that ! 😀