mpr: Set the CONNECT_LOCALDRIVE flag in case a local redirection is made on connection.

Signed-off-by: Pierre Schweitzer <pierre@reactos.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Pierre Schweitzer 2016-08-02 13:24:22 +02:00 committed by Alexandre Julliard
parent d2e68234b2
commit d6d0d96402
1 changed files with 8 additions and 0 deletions

View File

@ -1615,7 +1615,11 @@ static void use_connection_set_accessnameW(struct use_connection_context *ctxt,
{ {
WCHAR *accessname = ctxt->accessname; WCHAR *accessname = ctxt->accessname;
if (local_name) if (local_name)
{
strcpyW(accessname, local_name); strcpyW(accessname, local_name);
if (ctxt->result)
*ctxt->result = CONNECT_LOCALDRIVE;
}
else else
strcpyW(accessname, ctxt->resource->lpRemoteName); strcpyW(accessname, ctxt->resource->lpRemoteName);
} }
@ -1759,7 +1763,11 @@ static void use_connection_set_accessnameA(struct use_connection_context *ctxt,
{ {
char *accessname = ctxt->accessname; char *accessname = ctxt->accessname;
if (local_name) if (local_name)
{
WideCharToMultiByte(CP_ACP, 0, local_name, -1, accessname, *ctxt->buffer_size, NULL, NULL); WideCharToMultiByte(CP_ACP, 0, local_name, -1, accessname, *ctxt->buffer_size, NULL, NULL);
if (ctxt->result)
*ctxt->result = CONNECT_LOCALDRIVE;
}
else else
strcpy(accessname, ctxt->resourceA->lpRemoteName); strcpy(accessname, ctxt->resourceA->lpRemoteName);
} }