summaryrefslogtreecommitdiff
path: root/src/w32.c
diff options
context:
space:
mode:
authorJason Rumney <jasonr@gnu.org>2008-04-10 11:38:15 +0000
committerJason Rumney <jasonr@gnu.org>2008-04-10 11:38:15 +0000
commit40a339c881b095a5dd5508a1ef0d7bdb02cdec5f (patch)
treeb013096237f2a08fa2b8e115f84dd736eb51156c /src/w32.c
parent2b69ccfd469e67f772920e52ef52fa5aa1cbef02 (diff)
downloademacs-40a339c881b095a5dd5508a1ef0d7bdb02cdec5f.tar.gz
emacs-40a339c881b095a5dd5508a1ef0d7bdb02cdec5f.tar.bz2
emacs-40a339c881b095a5dd5508a1ef0d7bdb02cdec5f.zip
(logon_network_drive): Also logon to remote drives that
are mapped to drive letters.
Diffstat (limited to 'src/w32.c')
-rw-r--r--src/w32.c7
1 files changed, 6 insertions, 1 deletions
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. */