liximomo/vscode-sftp

Relative remote path not working for upload

schnere opened this issue · 1 comments

Do you read the FAQ?

Describe the bug
It is possible to download files using a relative path but uploading files with relative paths throws an error.
Referencing #268 (where the solution in the last comment is to switch to an absolute path)

To Reproduce
Steps to reproduce the behavior:
sftp.json:

{
    "name": "MySftpConnetion",
    "host": "server.example.com",
    "protocol": "sftp",
    "port": 22,
    "username": "sftpuser",
    "remotePath": "web/",
    "uploadOnSave": false,
    "agent": "$SSH_AUTH_SOCK"
}

Expected behavior
File Download works fine:

[08-31 09:19:19] [info] remote ➞ local /home/user/importantwordpressproject/xmlrpc.php

Download should work fine, too.

Error description

Uploading a file throws an error:

[08-31 09:19:34] [error] Error: Failure
	at 101 (/home/user/.vscode/extensions/liximomo.sftp-1.12.10/node_modules/ssh2/lib/protocol/SFTP.js:2618:19)
	at SFTP.push (/home/user/.vscode/extensions/liximomo.sftp-1.12.10/node_modules/ssh2/lib/protocol/SFTP.js:278:11)
	at CHANNEL_DATA (/home/user/.vscode/extensions/liximomo.sftp-1.12.10/node_modules/ssh2/lib/client.js:525:23)
	at 94 (/home/user/.vscode/extensions/liximomo.sftp-1.12.10/node_modules/ssh2/lib/protocol/handlers.misc.js:859:16)
	at Protocol.onPayload (/home/user/.vscode/extensions/liximomo.sftp-1.12.10/node_modules/ssh2/lib/protocol/Protocol.js:2025:10)
	at AESGCMDecipherNative.decrypt (/home/user/.vscode/extensions/liximomo.sftp-1.12.10/node_modules/ssh2/lib/protocol/crypto.js:987:26)
	at Protocol.parsePacket [as _parse] (/home/user/.vscode/extensions/liximomo.sftp-1.12.10/node_modules/ssh2/lib/protocol/Protocol.js:1994:25)
	at Protocol.parse (/home/user/.vscode/extensions/liximomo.sftp-1.12.10/node_modules/ssh2/lib/protocol/Protocol.js:293:16)
	at Socket.<anonymous> (/home/user/.vscode/extensions/liximomo.sftp-1.12.10/node_modules/ssh2/lib/client.js:713:21)
	at Socket.emit (node:events:390:28)
	at addChunk (node:internal/streams/readable:315:12)
	at readableAddChunk (node:internal/streams/readable:289:9)
	at Socket.Readable.push (node:internal/streams/readable:228:10)
	at TCP.onStreamRead (node:internal/stream_base_commons:199:23) 

Desktop (please complete the following information):

  • OS: Manjaro Linux
  • VSCode Version 1.70.2-1

Extension Logs from Startup - required
See above

You can try my version, I have fixed bugs and added new features, maybe this will fix the problem you are having.
https://marketplace.visualstudio.com/items?itemName=satiromarra.code-sftp