From 2cfcc874b9332ad207398b9e20dc8880d93e8ae4 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Thu, 25 Aug 2011 18:29:00 -0500 Subject: Better error handling out of package load method There are many other ways to fail a package load other than "file not found". We should also use the correct error code in this case. Clean it up a bit in the various callers. Signed-off-by: Dan McGee --- lib/libalpm/be_package.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/libalpm/be_package.c') diff --git a/lib/libalpm/be_package.c b/lib/libalpm/be_package.c index 2566574d..0e58d20a 100644 --- a/lib/libalpm/be_package.c +++ b/lib/libalpm/be_package.c @@ -308,7 +308,7 @@ alpm_pkg_t *_alpm_pkg_load_internal(alpm_handle_t *handle, const char *pkgfile, newpkg->size = st.st_size; } else { /* couldn't stat the pkgfile, return an error */ - RET_ERR(handle, ALPM_ERR_PKG_OPEN, NULL); + RET_ERR(handle, ALPM_ERR_PKG_NOT_FOUND, NULL); } /* can we get away with skipping checksums? */ -- cgit v1.2.3-24-g4f1b