pacman/lib/libalpm
Allan McRae f86c15e780 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 <allan@archlinux.org>
2024-04-05 00:51:13 +00:00
..
po Update bug report URL in tranlsation configuration files 2024-03-19 12:02:44 +10:00
.gitignore libalpm: add pkg-config file 2012-04-25 20:02:36 -04:00
add.c Update copyright years 2024-02-24 18:40:44 +10:00
add.h Update copyright years 2024-02-24 18:40:44 +10:00
alpm.c use snprintf instead of sprintf 2024-03-25 13:24:41 +10:00
alpm.h Provide function for switching user in child processes 2024-04-01 20:52:55 +00:00
alpm_list.c Update copyright years 2024-02-24 18:40:44 +10:00
alpm_list.h Update copyright years 2024-02-24 18:40:44 +10:00
backup.c Update copyright years 2024-02-24 18:40:44 +10:00
backup.h Update copyright years 2024-02-24 18:40:44 +10:00
base64.c base64.c: comment out unused variable 2014-01-15 15:54:56 +10:00
base64.h Do not #define _RESERVED_IDENTIFIERS 2016-09-25 18:04:57 +10:00
be_local.c use snprintf instead of sprintf 2024-03-25 13:24:41 +10:00
be_package.c Update copyright years 2024-02-24 18:40:44 +10:00
be_sync.c Download to a temporary directory owned by the Download user 2024-04-01 20:52:55 +00:00
conflict.c use snprintf instead of sprintf 2024-03-25 13:24:41 +10:00
conflict.h Update copyright years 2024-02-24 18:40:44 +10:00
db.c use snprintf instead of sprintf 2024-03-25 13:24:41 +10:00
db.h Update copyright years 2024-02-24 18:40:44 +10:00
deps.c Update copyright years 2024-02-24 18:40:44 +10:00
deps.h Update copyright years 2024-02-24 18:40:44 +10:00
diskspace.c Update copyright years 2024-02-24 18:40:44 +10:00
diskspace.h Update copyright years 2024-02-24 18:40:44 +10:00
dload.c Restore partially downloaded files to the temporary directory 2024-04-01 20:52:55 +00:00
dload.h Download to a temporary directory owned by the Download user 2024-04-01 20:52:55 +00:00
error.c Update copyright years 2024-02-24 18:40:44 +10:00
filelist.c Do not pass NULL paramenter to bsearch with empty filelist 2024-04-05 00:35:08 +00:00
filelist.h Update copyright years 2024-02-24 18:40:44 +10:00
graph.c Update copyright years 2024-02-24 18:40:44 +10:00
graph.h Update copyright years 2024-02-24 18:40:44 +10:00
group.c Update copyright years 2024-02-24 18:40:44 +10:00
group.h Update copyright years 2024-02-24 18:40:44 +10:00
handle.c Add DownloadUser configuration option 2024-04-01 20:52:55 +00:00
handle.h Add DownloadUser configuration option 2024-04-01 20:52:55 +00:00
hook.c Update copyright years 2024-02-24 18:40:44 +10:00
hook.h Update copyright years 2024-02-24 18:40:44 +10:00
libarchive-compat.h Update copyright years 2024-02-24 18:40:44 +10:00
log.c Update copyright years 2024-02-24 18:40:44 +10:00
log.h Update copyright years 2024-02-24 18:40:44 +10:00
meson.build Add callbacks for sandboxed operations 2024-04-01 20:52:55 +00:00
package.c Update copyright years 2024-02-24 18:40:44 +10:00
package.h Update copyright years 2024-02-24 18:40:44 +10:00
pkghash.c Update copyright years 2024-02-24 18:40:44 +10:00
pkghash.h Update copyright years 2024-02-24 18:40:44 +10:00
rawstr.c Remove all modelines from the project 2018-05-14 09:59:15 +10:00
remove.c unlink_file: restore trailing slash on directory before checking mountpoint 2024-04-05 00:51:13 +00:00
remove.h Update copyright years 2024-02-24 18:40:44 +10:00
sandbox.c Add callbacks for sandboxed operations 2024-04-01 20:52:55 +00:00
sandbox.h Add callbacks for sandboxed operations 2024-04-01 20:52:55 +00:00
signing.c use snprintf instead of sprintf 2024-03-25 13:24:41 +10:00
signing.h Update copyright years 2024-02-24 18:40:44 +10:00
sync.c Download to a temporary directory owned by the Download user 2024-04-01 20:52:55 +00:00
sync.h Update copyright years 2024-02-24 18:40:44 +10:00
trans.c use snprintf instead of sprintf 2024-03-25 13:24:41 +10:00
trans.h Update copyright years 2024-02-24 18:40:44 +10:00
util.c Download to a temporary directory owned by the Download user 2024-04-01 20:52:55 +00:00
util.h Download to a temporary directory owned by the Download user 2024-04-01 20:52:55 +00:00
version.c Update copyright years 2024-02-24 18:40:44 +10:00