summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChantry Xavier <shiningxc@gmail.com>2007-06-28 16:59:34 +0200
committerChantry Xavier <shiningxc@gmail.com>2007-06-28 17:14:26 +0200
commit1a3b3bc1300b42dc2f554a6faa09b5ece2d3321c (patch)
tree32bc6327ef22d8a409939fbe689f18b8b3690dca
parent78bac81a58355a6d42760e1974005dbcdd8e8dcf (diff)
downloadpacman-1a3b3bc1300b42dc2f554a6faa09b5ece2d3321c.tar.xz
libalpm/util.c : stat returns 0 on success
Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
-rw-r--r--lib/libalpm/util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libalpm/util.c b/lib/libalpm/util.c
index ec6c1df1..66702691 100644
--- a/lib/libalpm/util.c
+++ b/lib/libalpm/util.c
@@ -162,7 +162,7 @@ int _alpm_copyfile(const char *src, const char *dest)
/* chmod dest to permissions of src, as long as it is not a symlink */
struct stat statbuf;
- if(stat(src, &statbuf)) {
+ if(!stat(src, &statbuf)) {
if(! S_ISLNK(statbuf.st_mode)) {
chmod(dest, statbuf.st_mode);
}