calculate_removed_size: ensure llstat succeeds
Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
parent
578ceb29fa
commit
8f92fe47a7
1 changed files with 6 additions and 1 deletions
|
@ -235,7 +235,12 @@ static int calculate_removed_size(alpm_handle_t *handle,
|
||||||
const char *filename = file->name;
|
const char *filename = file->name;
|
||||||
|
|
||||||
snprintf(path, PATH_MAX, "%s%s", handle->root, filename);
|
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
|
/* skip directories and symlinks to be consistent with libarchive that
|
||||||
* reports them to be zero size */
|
* reports them to be zero size */
|
||||||
|
|
Loading…
Add table
Reference in a new issue