emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] emacs/src w32.c [EMACS_23_1_RC]


From: Eli Zaretskii
Subject: [Emacs-diffs] emacs/src w32.c [EMACS_23_1_RC]
Date: Fri, 10 Jul 2009 08:48:11 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Branch:         EMACS_23_1_RC
Changes by:     Eli Zaretskii <eliz>    09/07/10 08:48:11

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&only_with_tag=EMACS_23_1_RC&r1=1.161&r2=1.161.2.1

Patches:
Index: w32.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/w32.c,v
retrieving revision 1.161
retrieving revision 1.161.2.1
diff -u -b -r1.161 -r1.161.2.1
--- w32.c       21 Mar 2009 11:29:29 -0000      1.161
+++ w32.c       10 Jul 2009 08:48:11 -0000      1.161.2.1
@@ -3154,11 +3154,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]