diff options
author | Chantry Xavier <shiningxc@gmail.com> | 2007-12-09 02:04:28 +0100 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2007-12-09 04:54:46 +0100 |
commit | 2ef78355fc65a38bd64e430c8f19e2ae9ab7648f (patch) | |
tree | b97d3960a184762c935f4d42176dc8f774e2da34 /lib | |
parent | 97fe3d3f5adecfbf9d6bf201161d743361107e32 (diff) | |
download | pacman-2ef78355fc65a38bd64e430c8f19e2ae9ab7648f.tar.gz pacman-2ef78355fc65a38bd64e430c8f19e2ae9ab7648f.tar.xz |
_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>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libalpm/util.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libalpm/util.c b/lib/libalpm/util.c index 2a429488..57485c2e 100644 --- a/lib/libalpm/util.c +++ b/lib/libalpm/util.c @@ -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); |