Commit f352d025 authored by Paul Eggert's avatar Paul Eggert

Fix PWD check on DOS_NT

* src/sysdep.c (get_current_dir_name_or_unreachable):
Do not consider a file name like "a:b" to be absolute on DOS_NT.
parent 934f08f3
......@@ -274,8 +274,8 @@ get_current_dir_name_or_unreachable (void)
sometimes a nicer name, and using it may avoid a fatal error if a
parent directory is searchable but not readable. */
if (pwd
&& (IS_DIRECTORY_SEP (*pwd) || (*pwd && IS_DEVICE_SEP (pwd[1])))
&& (pwdlen = strlen (pwd)) < bufsize_max
&& IS_DIRECTORY_SEP (pwd[pwdlen && IS_DEVICE_SEP (pwd[1]) ? 2 : 0])
&& stat (pwd, &pwdstat) == 0
&& stat (".", &dotstat) == 0
&& dotstat.st_ino == pwdstat.st_ino
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment