mirror of
https://github.com/moparisthebest/pacman
synced 2025-01-10 13:28:12 -05:00
Remove unnecessary archive_entry_set_pathname() calls
I'm not sure why these were ever here, as by this point we have already extracted the file meaning a call to this function is basically a no-op. Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
parent
6d79ba2db0
commit
245efca759
@ -500,19 +500,16 @@ static int extract_single_file(struct archive *archive,
|
|||||||
|
|
||||||
/* move the existing file to the "pacorig" */
|
/* move the existing file to the "pacorig" */
|
||||||
if(rename(filename, newpath)) {
|
if(rename(filename, newpath)) {
|
||||||
archive_entry_set_pathname(entry, filename);
|
|
||||||
_alpm_log(PM_LOG_ERROR, _("could not rename %s (%s)\n"), filename, strerror(errno));
|
_alpm_log(PM_LOG_ERROR, _("could not rename %s (%s)\n"), filename, strerror(errno));
|
||||||
alpm_logaction("error: could not rename %s (%s)\n", filename, strerror(errno));
|
alpm_logaction("error: could not rename %s (%s)\n", filename, strerror(errno));
|
||||||
errors++;
|
errors++;
|
||||||
} else {
|
} else {
|
||||||
/* copy the tempfile we extracted to the real path */
|
/* copy the tempfile we extracted to the real path */
|
||||||
if(_alpm_copyfile(tempfile, filename)) {
|
if(_alpm_copyfile(tempfile, filename)) {
|
||||||
archive_entry_set_pathname(entry, filename);
|
|
||||||
_alpm_log(PM_LOG_ERROR, _("could not copy tempfile to %s (%s)\n"), filename, strerror(errno));
|
_alpm_log(PM_LOG_ERROR, _("could not copy tempfile to %s (%s)\n"), filename, strerror(errno));
|
||||||
alpm_logaction("error: could not copy tempfile to %s (%s)\n", filename, strerror(errno));
|
alpm_logaction("error: could not copy tempfile to %s (%s)\n", filename, strerror(errno));
|
||||||
errors++;
|
errors++;
|
||||||
} else {
|
} else {
|
||||||
archive_entry_set_pathname(entry, filename);
|
|
||||||
_alpm_log(PM_LOG_WARNING, _("%s saved as %s\n"), filename, newpath);
|
_alpm_log(PM_LOG_WARNING, _("%s saved as %s\n"), filename, newpath);
|
||||||
alpm_logaction("warning: %s saved as %s\n", filename, newpath);
|
alpm_logaction("warning: %s saved as %s\n", filename, newpath);
|
||||||
}
|
}
|
||||||
@ -531,7 +528,6 @@ static int extract_single_file(struct archive *archive,
|
|||||||
_alpm_log(PM_LOG_ERROR, _("could not copy tempfile to %s (%s)\n"), filename, strerror(errno));
|
_alpm_log(PM_LOG_ERROR, _("could not copy tempfile to %s (%s)\n"), filename, strerror(errno));
|
||||||
errors++;
|
errors++;
|
||||||
}
|
}
|
||||||
archive_entry_set_pathname(entry, filename);
|
|
||||||
} else {
|
} else {
|
||||||
/* there's no sense in installing the same file twice, install
|
/* there's no sense in installing the same file twice, install
|
||||||
* ONLY is the original and package hashes differ */
|
* ONLY is the original and package hashes differ */
|
||||||
|
Loading…
Reference in New Issue
Block a user