GNU bug report logs - #3542
23.0.94; File access via UNC path slow again under Windows

Previous Next

Packages: w32, emacs;

Reported by: Mathias Dahl <mathias.dahl <at> gmail.com>

Date: Fri, 12 Jun 2009 09:45:04 UTC

Severity: normal

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #12 received at 3542-done <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: 3542-done <at> debbugs.gnu.org
Subject: Re: bug #3542 (23.0.94; File access via UNC path slow again under Windows)
Date: Thu, 09 Jul 2009 21:50:19 +0300
> From: Mathias Dahl <mathias.dahl <at> gmail.com>
> Date: Sun, 5 Jul 2009 23:01:53 +0200
> 
> I understand that the release of 23.1 is not far away and I am a bit
> worried that this bug won't be solved before that. Is there anything I
> can do to help? I use a lot of UNC file names / paths in my work and
> the current slowness is very annoying (both opening files and listing
> them in Dired). As this was a problem in the past too it isn't
> unreasonable to believe that the bug has reappeared by mistake when
> fixing some other thing (could it be related to TRAMP?).
> 
> I am willing to go bug hunting as long as it's in elisp-land and would
> like to get some hints on where to start digging.
> 
> For details see:
> http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3542
> 
> Thanks!

Fixed with this patch:

2009-07-09  Eli Zaretskii  <eliz <at> gnu.org>

	* w32.c (stat): Treat UNC file names as residing on remote
	drives.  (Bug#3542)

--- src/w32.c.orig	2009-06-21 10:38:18.000000000 +0300
+++ src/w32.c	2009-07-09 16:31:51.250000000 +0300
@@ -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);



This bug report was last modified 15 years and 325 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.