Skip to content

unlink_file: restore trailing slash on directory before checking mountpoint

Allan McRae requested to merge allan/unlink_file into master

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. Replace the trailing slash with we have established we are dealing with a directory.

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

Signed-off-by: Allan McRae allan@archlinux.org

Merge request reports