summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);
}