[client,common] skip invalid drives to redirect
Fixes #9989: ignore invalid drive (=path) redirections from configuration, but notify the user with a warning message.
This commit is contained in:
parent
bdd866c3d3
commit
925b23bef5
@ -214,18 +214,20 @@ static BOOL freerdp_client_add_drive(rdpSettings* settings, const char* path, co
|
||||
|
||||
if (!path)
|
||||
goto fail;
|
||||
else
|
||||
|
||||
{
|
||||
BOOL isSpecial = FALSE;
|
||||
BOOL isPath = freerdp_path_valid(path, &isSpecial);
|
||||
|
||||
if (!isPath && !isSpecial)
|
||||
{
|
||||
WLog_WARN(TAG, "Invalid drive to redirect: '%s' does not exist, skipping.", path);
|
||||
freerdp_device_free(device);
|
||||
}
|
||||
else if (!freerdp_device_collection_add(settings, device))
|
||||
goto fail;
|
||||
}
|
||||
|
||||
if (!freerdp_device_collection_add(settings, device))
|
||||
goto fail;
|
||||
|
||||
return TRUE;
|
||||
|
||||
fail:
|
||||
|
Loading…
Reference in New Issue
Block a user