Allan McRae pushed to branch master at Pacman / Pacman


Commits:
f86c15e7 by Allan McRae at 2024-04-05T00:51:13+00:00
unlink_file: restore trailing slash on directory before checking mountpoint

The dir_is_mountpoint() function has the explicit requirement that the
trailing slash of the directory is present.  We strip the trailing slash
in unlink_file() to handle directories replaced with symlinks, but that
then affects the dir_is_mountpoint() check.

Add the trailing slash when we have established we are dealing with a
directory. Note this may fail in the case of a file managed by pacmane
with name length of PATH_MAX that has been replaced by a directory on the
file system. Bail on this unlikely scenario.

In addtion, be less fancy with adjusting length of the file char array.

Signed-off-by: Allan McRae <[email protected]>

- - - - -


1 changed file:

- lib/libalpm/remove.c


View it on GitLab: 
https://gitlab.archlinux.org/pacman/pacman/-/commit/f86c15e7804311df6469e020f07e4bc8b2644bb6

-- 
View it on GitLab: 
https://gitlab.archlinux.org/pacman/pacman/-/commit/f86c15e7804311df6469e020f07e4bc8b2644bb6
You're receiving this email because of your account on gitlab.archlinux.org.


Reply via email to