From c865c4eb64f97c0232bcfbfdb3ee1bfd1dad4d36 Mon Sep 17 00:00:00 2001 From: akallabeth Date: Tue, 22 Dec 2020 10:24:27 +0100 Subject: [PATCH] Added support for `file://` urls for rdp files --- client/common/file.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/client/common/file.c b/client/common/file.c index 3dd1032ab..e66cef2da 100644 --- a/client/common/file.c +++ b/client/common/file.c @@ -791,7 +791,11 @@ BOOL freerdp_client_parse_rdp_file_ex(rdpFile* file, const char* name, rdp_file_ FILE* fp = NULL; size_t read_size; INT64 file_size; - fp = fopen(name, "r"); + const char* fname = name; + if (_strnicmp(fname, "file://", 7) == 0) + fname = &name[7]; + + fp = fopen(fname, "r"); if (!fp) {