diff options
author | Aurelien Foret <aurelien@archlinux.org> | 2006-01-26 23:16:57 +0100 |
---|---|---|
committer | Aurelien Foret <aurelien@archlinux.org> | 2006-01-26 23:16:57 +0100 |
commit | 831ff882ae70e83af0369a6c9a6faf825b8a884a (patch) | |
tree | ed34617626d708927a7d9a36873149e71fd126d1 /lib/libalpm/util.c | |
parent | 18986b1805feb805e3d4da1d94c98ec518836431 (diff) | |
download | pacman-831ff882ae70e83af0369a6c9a6faf825b8a884a.tar.gz pacman-831ff882ae70e83af0369a6c9a6faf825b8a884a.tar.xz |
reworked lock handling (patch from VMiklos <vmiklos@frugalware.org>)
Diffstat (limited to 'lib/libalpm/util.c')
-rw-r--r-- | lib/libalpm/util.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/libalpm/util.c b/lib/libalpm/util.c index 3458e156..ea189c09 100644 --- a/lib/libalpm/util.c +++ b/lib/libalpm/util.c @@ -225,7 +225,10 @@ int _alpm_lckmk(char *file) */ int _alpm_lckrm(char *file) { - return(unlink(file) == -1); + if(unlink(file) == -1 && errno != ENOENT) { + return(-1); + } + return(0); } int _alpm_unpack(char *archive, const char *prefix, const char *fn) |