emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] emacs/src w32.c


From: Eli Zaretskii
Subject: [Emacs-diffs] emacs/src w32.c
Date: Thu, 09 Jul 2009 18:44:14 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Changes by:     Eli Zaretskii <eliz>    09/07/09 18:44:14

Modified files:
        src            : w32.c 

Log message:
        (stat): Treat UNC file names as residing on remote drives.  (Bug#3542)

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/src/w32.c?cvsroot=emacs&r1=1.163&r2=1.164

Patches:
Index: w32.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/w32.c,v
retrieving revision 1.163
retrieving revision 1.164
diff -u -b -r1.163 -r1.164
--- w32.c       4 Jul 2009 10:42:45 -0000       1.163
+++ w32.c       9 Jul 2009 18:44:14 -0000       1.164
@@ -3347,11 +3347,13 @@
        }
     }
 
-  /* GetDriveType needs the root directory of NAME's drive.  */
-  if (!(strlen (name) >= 2 && IS_DEVICE_SEP (name[1])))
-    devtype = GetDriveType (NULL); /* use root of current diectory */
+  if (IS_DIRECTORY_SEP (name[0]) && IS_DIRECTORY_SEP (name[1]))
+    devtype = DRIVE_REMOTE;       /* assume UNC name is remote */
+  else if (!(strlen (name) >= 2 && IS_DEVICE_SEP (name[1])))
+    devtype = GetDriveType (NULL); /* use root of current drive */
   else
     {
+      /* GetDriveType needs the root directory of NAME's drive.  */
       strncpy (drive_root, name, 3);
       drive_root[3] = '\0';
       devtype = GetDriveType (drive_root);




reply via email to

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