• Allan McRae's avatar
    Handle .part files that are the size of the correct package · e6a6d307
    Allan McRae authored
    In rare cases, likely due to a well timed Ctrl+C, but possibly due to a
    broken mirror, a ".part" file may have size at least that of the correct
    package size.
    When encountering this issue, currently pacman fails in different ways
    depending on where the package falls in the list to download.  If last,
    "wrong or NULL argument passed" error is reported, or a "invalid or
    corrupt package" issue if not.
    Capture these .part files, and remove the extension. This lets pacman
    either use the package if valid, or offer to remove it if it fails checksum
    or signature verification.
    Signed-off-by: Allan McRae's avatarAllan McRae <allan@archlinux.org>