Module: wine Branch: master Commit: d6d0d96402b9c187877f11da173f8fbbf62ba072 URL: http://source.winehq.org/git/wine.git/?a=commit;h=d6d0d96402b9c187877f11da17...
Author: Pierre Schweitzer pierre@reactos.org Date: Tue Aug 2 13:24:22 2016 +0200
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
---
dlls/mpr/wnet.c | 8 ++++++++ 1 file changed, 8 insertions(+)
diff --git a/dlls/mpr/wnet.c b/dlls/mpr/wnet.c index 5a67e5f..85dfca1 100644 --- a/dlls/mpr/wnet.c +++ b/dlls/mpr/wnet.c @@ -1615,7 +1615,11 @@ static void use_connection_set_accessnameW(struct use_connection_context *ctxt, { WCHAR *accessname = ctxt->accessname; if (local_name) + { strcpyW(accessname, local_name); + if (ctxt->result) + *ctxt->result = CONNECT_LOCALDRIVE; + } else strcpyW(accessname, ctxt->resource->lpRemoteName); } @@ -1759,7 +1763,11 @@ static void use_connection_set_accessnameA(struct use_connection_context *ctxt, { char *accessname = ctxt->accessname; if (local_name) + { WideCharToMultiByte(CP_ACP, 0, local_name, -1, accessname, *ctxt->buffer_size, NULL, NULL); + if (ctxt->result) + *ctxt->result = CONNECT_LOCALDRIVE; + } else strcpy(accessname, ctxt->resourceA->lpRemoteName); }