Cygwin: path_conv: add PC_SYM_NOFOLLOW_DIR flag
Usually a trailing slash requires to follow an existing symlink, even with PC_SYM_NOFOLLOW. The reason is that "foo/" is equivalent to "foo/." so the symlink is in fact not the last path component, "." is. This is default for almost all scenarios. PC_SYM_NOFOLLOW_DIR now allows the caller to request not to follow the symlink even if a trailing slash is given. This can be used in callers to perform certain functions Linux-compatible. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
@ -59,6 +59,7 @@ enum pathconv_arg
|
||||
PC_SYM_NOFOLLOW_PROCFD = _BIT (11), /* allow /proc/PID/fd redirection */
|
||||
PC_KEEP_HANDLE = _BIT (12), /* keep handle for later stat calls */
|
||||
PC_NO_ACCESS_CHECK = _BIT (13), /* helper flag for error check */
|
||||
PC_SYM_NOFOLLOW_DIR = _BIT (14), /* don't follow a trailing slash */
|
||||
PC_DONT_USE = _BIT (31) /* conversion to signed happens. */
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user