• Christian Hesse's avatar
    dload: avoid renaming files downloaded via sync operations · 3b3152fc
    Christian Hesse authored and Allan McRae's avatar Allan McRae committed
    If the server redirects from ${repo}.db to ${repo}.db.tar.gz pacman gets
    this wrong: It saves to new filename and fails when accessing
    We need the remote filename only when downloading remote files with
    pacman's -U operation. This introduces a new field 'trust_remote_name'
    to payload. If set pacman downloads to the filename given by the server.
    The field trust_remote_name is set in alpm_fetch_pkgurl().
    Fixes FS#36791 ([pacman] downloads to wrong filename with redirect).
    [dave: remove redundant assignment leading to memory leak]
    Signed-off-by: Allan McRae's avatarAllan McRae <allan@archlinux.org>