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

Negative progress on downloads #1704

Closed
richardgroves opened this issue Feb 10, 2023 · 2 comments
Closed

Negative progress on downloads #1704

richardgroves opened this issue Feb 10, 2023 · 2 comments

Comments

@richardgroves
Copy link
Contributor

It is possible to have a download progress block called with a negative progress value.

This occurs as the line:

int progress = (int)(self.downloadedBytes / (double)self.response.expectedContentLength * 100);

does not include a check for self.response.expectedContentLength == NSURLResponseUnknownLength (NSURLResponseUnknownLength = -1).

@parse-github-assistant
Copy link

Thanks for opening this issue!

  • ❌ Please edit your post and use the provided template when creating a new issue. This helps everyone to understand your post better and asks for essential information to quicker review the issue.

@richardgroves
Copy link
Contributor Author

Closing as the GitHub 'start a new issue from a line of code in the browser' doesn't start with the template required here, and back porting template in seems like a PITA - see #1705 (comment) instead

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

1 participant