From 1a3b3bc1300b42dc2f554a6faa09b5ece2d3321c Mon Sep 17 00:00:00 2001 From: Chantry Xavier Date: Thu, 28 Jun 2007 16:59:34 +0200 Subject: libalpm/util.c : stat returns 0 on success Signed-off-by: Chantry Xavier --- lib/libalpm/util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') 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); } -- cgit v1.2.3-24-g4f1b