From 2ef78355fc65a38bd64e430c8f19e2ae9ab7648f Mon Sep 17 00:00:00 2001 From: Chantry Xavier Date: Sun, 9 Dec 2007 02:04:28 +0100 Subject: _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 Signed-off-by: Dan McGee --- lib/libalpm/util.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/libalpm/util.c') 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); -- cgit v1.2.3-70-g09d2