1
0
mirror of https://github.com/moparisthebest/pacman synced 2025-03-11 07:31:04 -04:00

calculate_removed_size: ensure llstat succeeds

Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
Allan McRae 2015-02-25 01:10:35 +10:00
parent 578ceb29fa
commit 8f92fe47a7

View File

@ -235,7 +235,12 @@ static int calculate_removed_size(alpm_handle_t *handle,
const char *filename = file->name;
snprintf(path, PATH_MAX, "%s%s", handle->root, filename);
llstat(path, &st);
if(llstat(path, &st) == -1) {
_alpm_log(handle, ALPM_LOG_WARNING,
_("could not get file information for %s\n"), filename);
continue;
}
/* skip directories and symlinks to be consistent with libarchive that
* reports them to be zero size */