libalpm/util.c : stat returns 0 on success

Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
This commit is contained in:
Chantry Xavier 2007-06-28 16:59:34 +02:00
parent 78bac81a58
commit 1a3b3bc130
1 changed files with 1 additions and 1 deletions

View File

@ -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);
}