From b1e495b88d77744085a6d0ea8d2b4480b9063409 Mon Sep 17 00:00:00 2001 From: Andrew Gregory Date: Sun, 10 Mar 2013 15:25:49 -0400 Subject: unlink_file: treat symlinks like normal files We always want to work with the package file itself, not its target if it's a symlink. Signed-off-by: Andrew Gregory Signed-off-by: Allan McRae --- lib/libalpm/remove.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/libalpm/remove.c b/lib/libalpm/remove.c index 652aa501..0b4f80cd 100644 --- a/lib/libalpm/remove.c +++ b/lib/libalpm/remove.c @@ -442,11 +442,7 @@ static int unlink_file(alpm_handle_t *handle, alpm_pkg_t *oldpkg, return 1; } - /* 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)) { + if(_alpm_lstat(file, &buf)) { _alpm_log(handle, ALPM_LOG_DEBUG, "file %s does not exist\n", file); return 1; } -- cgit v1.2.3-70-g09d2