emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs-26 f352d02 2/2: Fix PWD check on DOS_NT


From: Paul Eggert
Subject: [Emacs-diffs] emacs-26 f352d02 2/2: Fix PWD check on DOS_NT
Date: Mon, 9 Oct 2017 13:49:01 -0400 (EDT)

branch: emacs-26
commit f352d0257ce5ca1d424b55fc179f18b81bd465ab
Author: Paul Eggert <address@hidden>
Commit: Paul Eggert <address@hidden>

    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.
---
 src/sysdep.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/sysdep.c b/src/sysdep.c
index 6d24b7f..dd0062b 100644
--- a/src/sysdep.c
+++ b/src/sysdep.c
@@ -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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]