mirror of
https://github.com/moparisthebest/pacman
synced 2025-03-01 09:51:50 -05:00
libalpm: Set ret correctly in download_internal()
Immediately jump to the cleanup code after setting the return code to -1 in case rename() fails. Otherwise, it will be reset to 0 right after we leave the if branch. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de> Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
parent
297cd7897b
commit
005eab0a08
@ -308,6 +308,7 @@ static int download_internal(const char *url, const char *localpath,
|
||||
_alpm_log(PM_LOG_ERROR, _("could not rename %s to %s (%s)\n"),
|
||||
tempfile, destfile, strerror(errno));
|
||||
ret = -1;
|
||||
goto cleanup;
|
||||
}
|
||||
ret = 0;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user