diff options
Diffstat (limited to 'debian/patches/0020-Use-specific-names-for-drive-hotplug-special-values.patch')
-rw-r--r-- | debian/patches/0020-Use-specific-names-for-drive-hotplug-special-values.patch | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/debian/patches/0020-Use-specific-names-for-drive-hotplug-special-values.patch b/debian/patches/0020-Use-specific-names-for-drive-hotplug-special-values.patch deleted file mode 100644 index 1ee2cf8..0000000 --- a/debian/patches/0020-Use-specific-names-for-drive-hotplug-special-values.patch +++ /dev/null @@ -1,57 +0,0 @@ -From 187cbdfe2c0abdef554306394d12a9b28a5100eb Mon Sep 17 00:00:00 2001 -From: akallabeth <akallabeth@posteo.net> -Date: Tue, 9 Mar 2021 12:09:58 +0100 -Subject: [PATCH 20/36] Use specific names for drive hotplug special values - -(cherry picked from commit b1be3d78fcc63a5842f7707a139b2582a4a42b21) ---- - client/common/cmdline.c | 24 ++++++++++++++++++++++-- - 1 file changed, 22 insertions(+), 2 deletions(-) - ---- a/client/common/cmdline.c -+++ b/client/common/cmdline.c -@@ -120,6 +120,23 @@ - return TRUE; - } - -+static char* name_from_path(const char* path) -+{ -+ const char* name = "NULL"; -+ if (path) -+ { -+ if (_strnicmp(path, "%", 2) == 0) -+ name = "home"; -+ else if (_strnicmp(path, "*", 2) == 0) -+ name = "hotplug-all"; -+ else if (_strnicmp(path, "DynamicDrives", 2) == 0) -+ name = "hotplug"; -+ else -+ name = path; -+ } -+ return _strdup(name); -+} -+ - static BOOL freerdp_client_add_drive(rdpSettings* settings, const char* path, const char* name) - { - RDPDR_DRIVE* drive; -@@ -151,8 +168,10 @@ - goto fail; - } - else /* We need a name to send to the server. */ -- if (!(drive->Name = _strdup(path))) -- goto fail; -+ { -+ if (!(drive->Name = name_from_path(path))) -+ goto fail; -+ } - - if (!path || !freerdp_sanitize_drive_name(drive->Name, "\\/", "__")) - goto fail; -@@ -3557,6 +3576,7 @@ - /* Syntax: Comma seperated list of the following entries: - * '*' ... Redirect all drives, including hotplug - * 'DynamicDrives' ... hotplug -+ * '%' ... user home directory - * <label>(<path>) ... One or more paths to redirect. - * <path>(<label>) ... One or more paths to redirect. - * <path> ... One or more paths to redirect. |