mirror of
https://github.com/moparisthebest/pacman
synced 2024-08-13 17:03:46 -04:00
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 <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
parent
bc3e73fc8f
commit
b1e495b88d
@ -442,11 +442,7 @@ static int unlink_file(alpm_handle_t *handle, alpm_pkg_t *oldpkg,
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* we want to do a lstat here, and not a _alpm_lstat.
|
if(_alpm_lstat(file, &buf)) {
|
||||||
* 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(handle, ALPM_LOG_DEBUG, "file %s does not exist\n", file);
|
_alpm_log(handle, ALPM_LOG_DEBUG, "file %s does not exist\n", file);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user