Is it normal to have no error on fastGet when a local path does not exist?
See original GitHub issueI am using fastGet to download files from a remote SFTP. I have made some tests and unintentionally insert a non-existent path into localPath parameter.
When my code runs the path does not exist so the file was not downloaded
client.fastGet('/server/remote-path/file.zip', '/tmp/nonexistent-local-test-path/file.zip')
Is it ok? Could not have some kind of error or warning for the user knows that the file will not be downloaded?
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (5 by maintainers)
Top Results From Across the Web
fastGet/fastPut problems with node v14.2.0 · Issue #156 - GitHub
I've tried aainst a remote server as well as a local server running on vbox image with same results, so don't think it...
Read more >Node.js ssh2-sftp-client Error: fastPut: No response from ...
I have no idea what causes this error, I've tried with different paths and get either bad path error or this. What could...
Read more >5.3.1 - ssh2-sftp-client - npm
WARNING There is currently a regression error with versions of node ... The realPath() method now returns '' if the path does not...
Read more >Ssh2-sftp-client NPM - npm.io
Path to remote file to be deleted. noErrorOK: boolean. If true, no error is raised when you try to delete a non-existent file....
Read more >ssh2-sftp-client-fork - npm Package Health Analysis - Snyk
The realPath() method now returns '' if the path does not exist rather ... it will fail with an error about no available...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
mscdex/ssh2#1034
I should have also mentioned that until a fix is available from ssh2, you could add a path test and verify the destination path before calling fastGet(). If the issue cannot be resolved in the ssh2 module itself, I will likely add such a test to ssh2-sftp-client. However, I think it is better to wait and get a response from the ssh2 author before I do this.