1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-08-13 17:03:46 -04:00

_alpm_unpack: return 1 when the file is not found.

If _alpm_unpack has a specific file to extract (not NULL), but doesn't find
it, it'll now return 1, for indicating the failure.

Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
Chantry Xavier 2007-12-09 02:04:28 +01:00 committed by Dan McGee
parent 97fe3d3f5a
commit 2ef78355fc

View File

@ -370,7 +370,7 @@ int _alpm_lckrm()
int _alpm_unpack(const char *archive, const char *prefix, const char *fn)
{
int ret = 0;
int ret = 1;
mode_t oldmask;
struct archive *_archive;
struct archive_entry *entry;
@ -410,6 +410,7 @@ int _alpm_unpack(const char *archive, const char *prefix, const char *fn)
}
continue;
}
ret = 0;
snprintf(expath, PATH_MAX, "%s/%s", prefix, entryname);
archive_entry_set_pathname(entry, expath);