summaryrefslogtreecommitdiff
path: root/src/w32.c
diff options
context:
space:
mode:
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. */