-
-
Notifications
You must be signed in to change notification settings - Fork 29
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
sftp.get downloads only the last chunk of file #341
Comments
The link to the actual code line: pylibssh/src/pylibsshext/sftp.pyx Line 103 in ba0797c
Reading through the python questions, this sounds like a common confusion and I think you are right that this should be Wondering why nobody noticed this earlier. |
Jakuje
added a commit
to Jakuje/pylibssh
that referenced
this issue
Aug 30, 2024
Signed-off-by: Jakub Jelen <[email protected]>
Jakuje
added a commit
to Jakuje/pylibssh
that referenced
this issue
Aug 30, 2024
Fixes: ansible#341 Signed-off-by: Jakub Jelen <[email protected]>
Jakuje
added a commit
to Jakuje/pylibssh
that referenced
this issue
Aug 30, 2024
Fixes: ansible#341 Signed-off-by: Jakub Jelen <[email protected]>
Jakuje
added a commit
to Jakuje/pylibssh
that referenced
this issue
Aug 30, 2024
Signed-off-by: Jakub Jelen <[email protected]>
Jakuje
added a commit
to Jakuje/pylibssh
that referenced
this issue
Sep 11, 2024
Signed-off-by: Jakub Jelen <[email protected]>
Jakuje
added a commit
to Jakuje/pylibssh
that referenced
this issue
Sep 11, 2024
Signed-off-by: Jakub Jelen <[email protected]>
Jakuje
added a commit
to Jakuje/pylibssh
that referenced
this issue
Sep 11, 2024
Signed-off-by: Jakub Jelen <[email protected]>
webknjaz
pushed a commit
to Jakuje/pylibssh
that referenced
this issue
Sep 12, 2024
Signed-off-by: Jakub Jelen <[email protected]>
webknjaz
pushed a commit
to Jakuje/pylibssh
that referenced
this issue
Sep 12, 2024
Signed-off-by: Jakub Jelen <[email protected]>
Jakuje
added a commit
to Jakuje/pylibssh
that referenced
this issue
Oct 24, 2024
Signed-off-by: Jakub Jelen <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
SUMMARY
I'm trying to download configuration file from remote router and getting only last chunk of the file.
ISSUE TYPE
PYLISSH and LIBSSH VERSION
OS / ENVIRONMENT
Ubuntu 22.04 LTS
Python 3.10.4
STEPS TO REPRODUCE
Narrowing the problem I wrote a piece of code below.
You need a file on remote host to reproduce it.
EXPECTED RESULTS
File 'm8.rsc' in current directory, size of 16K
ACTUAL RESULTS
File 'm8.rsc', containing last 223b of source file.
As I found out, the problem lays in line #103 of sftp.pyx
In python3, "w" parameter truncates the file, so during reading the source file new data overwrites old.
Please check and consider changing open mode to 'ab'
The text was updated successfully, but these errors were encountered: