From: Jason Rumney Date: Thu, 10 Apr 2008 11:38:15 +0000 (+0000) Subject: (logon_network_drive): Also logon to remote drives that X-Git-Tag: emacs-pretest-23.0.90~6353 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=40a339c881b095a5dd5508a1ef0d7bdb02cdec5f;p=emacs.git (logon_network_drive): Also logon to remote drives that are mapped to drive letters. --- diff --git a/src/ChangeLog b/src/ChangeLog index 317a67c37d9..f36731450d4 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2008-04-10 Jason Rumney + + * w32.c (logon_network_drive): Also logon to remote drives that + are mapped to drive letters. + 2008-04-10 Glenn Morris * xdisp.c (truncate-partial-width-windows): Doc fix. diff --git a/src/w32.c b/src/w32.c index af7de20bc3a..a04de3032e1 100644 --- a/src/w32.c +++ b/src/w32.c @@ -2046,10 +2046,15 @@ logon_network_drive (const char *path) NETRESOURCE resource; char share[MAX_PATH]; int i, n_slashes; + char drive[4]; + + sprintf (drive, "%c:\\", path[0]); /* Only logon to networked drives. */ - if (!IS_DIRECTORY_SEP (path[0]) || !IS_DIRECTORY_SEP (path[1])) + if ((!IS_DIRECTORY_SEP (path[0]) || !IS_DIRECTORY_SEP (path[1])) + && GetDriveType (drive) != DRIVE_REMOTE) return; + n_slashes = 2; strncpy (share, path, MAX_PATH); /* Truncate to just server and share name. */