Allow fixed drive redirection on Windows (a:, c:, ...) and fix macos drive duplication.

This commit is contained in:
Jonathan Lafontaine 2018-10-29 10:17:42 -04:00
parent b8ff18f37f
commit 35d7a1e38d
1 changed files with 2 additions and 2 deletions

View File

@ -135,7 +135,7 @@ BOOL check_path(char* path)
{
UINT type = GetDriveTypeA(path);
if (!(type == DRIVE_REMOVABLE || type == DRIVE_CDROM || type == DRIVE_REMOTE))
if (!(type == DRIVE_FIXED ||type == DRIVE_REMOVABLE || type == DRIVE_CDROM || type == DRIVE_REMOTE))
return FALSE;
return GetVolumeInformationA(path, NULL, 0, NULL, NULL, NULL, NULL, 0);
@ -439,7 +439,7 @@ static UINT handle_hotplug(rdpdrPlugin* rdpdr)
if (device_ext->path == NULL)
continue;
if (ConvertFromUnicode(CP_UTF8, 0, device_ext->path, 0, &path, 0, NULL, FALSE) <= 0)
if (ConvertFromUnicode(CP_UTF8, 0, device_ext->path, -1, &path, 0, NULL, FALSE) <= 0)
continue;
/* not plugable device */