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

Progress bar not working for SFTP resumed upload #7760

Closed
beslick5 opened this issue Sep 23, 2021 · 4 comments
Closed

Progress bar not working for SFTP resumed upload #7760

beslick5 opened this issue Sep 23, 2021 · 4 comments

Comments

@beslick5
Copy link

@beslick5 beslick5 commented Sep 23, 2021

When using -# option to display progress bar for file uploads the progress bar instantly shows 100% (no matter how much of the file is processed)

In prior versions the progress bar correctly and accurately shows percentage of file uploaded.

Issue found in curl 7.79.0 and curl 7.79.1

Example command to reproduce the issue...

curl -k -C - -# -u "MYUSER":"MYPASS" --ftp-ssl --retry 100 --retry-delay 60 -T c:\temp\BIGFILE.7z sftp://ftp.server.com.au/backups/

@bagder
Copy link
Member

@bagder bagder commented Sep 23, 2021

It does not repeat for me:

$ ./src/curl -u u:p sftp://localhost/8GB -o store -# -C -
##                                                                            3.1%^C
$ ./src/curl -u u:p sftp://localhost/8GB -o store -# -C -
####                                                                          6.2%^C
$ ./src/curl -u u:p sftp://localhost/8GB -o store -# -C -
#######                                                                      10.6%^C
$ ./src/curl -u u:p sftp://localhost/8GB -o store -# -C -
###########                                                                  16.0%^C
$ ./src/curl -u u:p sftp://localhost/8GB -o store -# -C -
################                                                             21.6%^C

@beslick5
Copy link
Author

@beslick5 beslick5 commented Sep 23, 2021

@beslick5
Copy link
Author

@beslick5 beslick5 commented Sep 23, 2021

I've confirmed the issue is when there is a combination of "-C -" (resume file) and "-#" (progress bar).

If you DO NOT use the "resume" option (-C -) then the progress bar works as expected.

This was never an issue in version 7.39.0 or prior. Have only noticed this issue since recently upgrading to v7.79.0 and v7.79.1

@beslick5
Copy link
Author

@beslick5 beslick5 commented Sep 23, 2021

Here is a more simplified example...

Issue occurs with any transfer with "-# -C -" options together...
curl -# -C - -k -u "user":"pass" -T C:\temp\BIG_FILE.7z sftp://ftp.server.com

Take out the "-C -" option and the progress bar works as expected...
curl -# -k -u "user":"pass" -T C:\temp\BIG_FILE.7z sftp://ftp.server.com

Attached image demonstrates the issue/output per working examples...
image

@bagder bagder changed the title Progress bar not working Progress bar not working for SFTP resumed upload Sep 23, 2021
bagder added a commit that referenced this issue Sep 27, 2021
This is a regression that was *probably* injected in the larger progress
bar overhaul in 2018.

Reported-by: beslick5 on github
Fixes #7760
@bagder bagder closed this in 74e9c77 Sep 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

2 participants