When file attributes are of no concern, there is no point to query them. --- winsup/cygwin/path.cc | 3 +++ winsup/cygwin/path.h | 1 + 2 files changed, 4 insertions(+)
diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc index abd3687df..f00707e86 100644 --- a/winsup/cygwin/path.cc +++ b/winsup/cygwin/path.cc @@ -931,7 +931,10 @@ path_conv::check (const char *src, unsigned opt, is_fs_via_procsys: + if (!(opt & PC_SKIP_SYM_CHECK)) + { symlen = sym.check (full_path, suff, fs, conv_handle); + } is_virtual_symlink: diff --git a/winsup/cygwin/path.h b/winsup/cygwin/path.h index 62bd5ddd5..56855e1c9 100644 --- a/winsup/cygwin/path.h +++ b/winsup/cygwin/path.h @@ -59,6 +59,7 @@ enum pathconv_arg 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_SKIP_SYM_CHECK = _BIT (15), /* skip symlink_info::check */ PC_DONT_USE = _BIT (31) /* conversion to signed happens. */ }; -- 2.29.2