Mercurial > emacs
changeset 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 | 5d1c1d3e8c97 |
children | 5e06fc9ed146 |
files | src/w32.c |
diffstat | 1 files changed, 6 insertions(+), 1 deletions(-) [+] |
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. */