Skip to content

Resumed downloads overwrite partial data in non-interactive mode #536

Description

@dajiaohuang

What happened?\n\nWhen a partial download exists at the internal .tmp path, downloadFile sends a Range request starting at the existing size. In non-interactive mode it then copies the ranged response without seeking to the end of the already-open file, so the response starts at offset 0 and overwrites the partial bytes instead of appending them.\n\n### Version\n\nmain at d5d0b56\n\n### Relevant log output\n\nA hermetic HTTP-server reproduction is sufficient: seed a partial file, have the server return the remaining bytes for the requested Range, then call the download helper with no progress bar. The result contains the remainder at the beginning rather than the complete payload. Seeking before both copy paths preserves the intended resumed-download behavior.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions