From 3586f8502cbc5e68f4e7772d59fce414920dd8d4 Mon Sep 17 00:00:00 2001 From: Armin Novak Date: Thu, 20 Jul 2017 12:35:43 +0200 Subject: [PATCH] Fixed missing unicode conversion for mac drive redirection. --- channels/rdpdr/client/rdpdr_main.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/channels/rdpdr/client/rdpdr_main.c b/channels/rdpdr/client/rdpdr_main.c index f679f8f..1ea4a59 100644 --- a/channels/rdpdr/client/rdpdr_main.c +++ b/channels/rdpdr/client/rdpdr_main.c @@ -420,6 +420,7 @@ static UINT handle_hotplug(rdpdrPlugin* rdpdr) for (j = 0; j < count; j++) { + char *path = NULL; BOOL dev_found = FALSE; device_ext = (DEVICE_DRIVE_EXT*)ListDictionary_GetItemValue( rdpdr->devman->devices, (void*)keys[j]); @@ -430,19 +431,25 @@ static UINT handle_hotplug(rdpdrPlugin* rdpdr) if (device_ext->path == NULL) continue; + ConvertFromUnicode(CP_UTF8, 0, device_ext->path, 0, &path, 0, NULL, FALSE); + /* not plugable device */ - if (strstr(device_ext->path, "/Volumes/") == NULL) + if (strstr(path, "/Volumes/") == NULL) + { + free(path); continue; + } for (i = 0; i < size; i++) { - if (strstr(device_ext->path, dev_array[i].path) != NULL) + if (strstr(path, dev_array[i].path) != NULL) { dev_found = TRUE; dev_array[i].to_add = FALSE; break; } } + free(path); if (!dev_found) { -- 2.7.4