]> git.eshelyaron.com Git - emacs.git/commitdiff
(stat): Fix test of Vw32_get_true_file_attributes against the value returned
authorEli Zaretskii <eliz@gnu.org>
Sat, 10 May 2008 07:56:42 +0000 (07:56 +0000)
committerEli Zaretskii <eliz@gnu.org>
Sat, 10 May 2008 07:56:42 +0000 (07:56 +0000)
by GetDriveType.

src/w32.c

index 894160a275d55a59e08e656a9902fa1196189b96..aa6c21e44025b4df59ef2ec757f912cbca9eea2d 100644 (file)
--- a/src/w32.c
+++ b/src/w32.c
@@ -2491,9 +2491,9 @@ stat (const char * path, struct stat * buf)
        }
     }
 
-  if (!NILP (Vw32_get_true_file_attributes)
-      && !(EQ (Vw32_get_true_file_attributes, Qlocal) && 
-          GetDriveType (name) == DRIVE_FIXED)
+  if (!(NILP (Vw32_get_true_file_attributes)
+       || (EQ (Vw32_get_true_file_attributes, Qlocal) &&
+           GetDriveType (name) != DRIVE_FIXED))
       /* No access rights required to get info.  */
       && (fh = CreateFile (name, 0, 0, NULL, OPEN_EXISTING,
                           FILE_FLAG_BACKUP_SEMANTICS, NULL))