summaryrefslogtreecommitdiffstats
path: root/lib/libalpm
diff options
context:
space:
mode:
authorChantry Xavier <shiningxc@gmail.com>2007-12-22 17:47:19 +0100
committerDan McGee <dan@archlinux.org>2007-12-29 02:55:38 +0100
commit457692b928617cf15d012477af49ced8a3060e9c (patch)
treecbb911b236989d4ae01ecb062822ad8f7049b282 /lib/libalpm
parentc84feb92dbbc6d5f60cb58db53cfc372acf0516c (diff)
downloadpacman-457692b928617cf15d012477af49ced8a3060e9c.tar.gz
pacman-457692b928617cf15d012477af49ced8a3060e9c.tar.xz
libalpm/remove.c : switch back to lstat usage.
commit b55abdce7a changed every instance of lstat to alpm_stat to remove an eventual trailing /, but in remove.c, this is not wanted. Ref: http://www.archlinux.org/pipermail/pacman-dev/2007-December/010451.html Signed-off-by: Chantry Xavier <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm')
-rw-r--r--lib/libalpm/remove.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/libalpm/remove.c b/lib/libalpm/remove.c
index 0e8b57aa..4f6d6473 100644
--- a/lib/libalpm/remove.c
+++ b/lib/libalpm/remove.c
@@ -203,7 +203,11 @@ static void unlink_file(pmpkg_t *info, alpm_list_t *lp, pmtrans_t *trans)
}
}
- if(_alpm_lstat(file, &buf)) {
+ /* we want to do a lstat here, and not a _alpm_lstat.
+ * if a directory in the package is actually a directory symlink on the
+ * filesystem, we want to work with the linked directory instead of the
+ * actual symlink */
+ if(lstat(file, &buf)) {
_alpm_log(PM_LOG_DEBUG, "file %s does not exist\n", file);
return;
}