Mercurial > emacs
diff src/w32.c @ 93973:40f40216ff24
(logon_network_drive): Also logon to remote drives that
are mapped to drive letters.
| author | Jason Rumney <jasonr@gnu.org> |
|---|---|
| date | Thu, 10 Apr 2008 11:37:56 +0000 |
| parents | 4e76a03232e5 |
| children | ca9efc5939fc |
line wrap: on
line diff
--- a/src/w32.c Thu Apr 10 11:07:37 2008 +0000 +++ b/src/w32.c Thu Apr 10 11:37:56 2008 +0000 @@ -2046,10 +2046,15 @@ 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. */
