index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Chantry Xavier <shiningxc@gmail.com> | 2007-07-13 10:41:40 +0200 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2007-07-13 10:18:52 -0400 |
commit | 8d62835ba18a7fb662c2f3a23b86a16fe1386388 (patch) | |
tree | 953768bfcfdd1f91ba92047be150164a8cb266b4 /lib/libalpm/conflict.c | |
parent | 5ed501565ef8caf4fe2043066750ed7564a2c52d (diff) |
-rw-r--r-- | lib/libalpm/conflict.c | 12 |
diff --git a/lib/libalpm/conflict.c b/lib/libalpm/conflict.c index 9ee89859..98f4d66e 100644 --- a/lib/libalpm/conflict.c +++ b/lib/libalpm/conflict.c @@ -431,8 +431,13 @@ alpm_list_t *_alpm_db_find_conflicts(pmdb_t *db, pmtrans_t *trans, char *root) snprintf(path, PATH_MAX, "%s%s", root, filestr); - /* stat the file - if it exists and is not a dir, do some checks */ - if(lstat(path, &buf) == 0 && !S_ISDIR(buf.st_mode)) { + /* stat the file - if it exists, do some checks */ + if(lstat(path, &buf) != 0) { + continue; + } + if(S_ISDIR(buf.st_mode)) { + _alpm_log(PM_LOG_DEBUG, "%s is a directory, not a conflict", path); + } else { _alpm_log(PM_LOG_DEBUG, "checking possible conflict: %s", path); /* Make sure the possible conflict is not a symlink that points to a @@ -496,9 +501,6 @@ alpm_list_t *_alpm_db_find_conflicts(pmdb_t *db, pmtrans_t *trans, char *root) conflicts = add_fileconflict(conflicts, PM_CONFLICT_TYPE_FILE, path, p1->name, NULL); } - } else { - if(S_ISDIR(buf.st_mode)) - _alpm_log(PM_LOG_DEBUG, "%s is a directory, not a conflict", path); } } alpm_list_free_inner(tmpfiles, &free); |