Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Relative remote path not working for upload #1006

Open
1 of 2 tasks
schnere opened this issue Aug 31, 2022 · 1 comment
Open
1 of 2 tasks

Relative remote path not working for upload #1006

schnere opened this issue Aug 31, 2022 · 1 comment

Comments

@schnere
Copy link

schnere commented Aug 31, 2022

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

@satiromarra
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants