From 9306a9a499cb30635f8a1b613885e36acfc0398c Mon Sep 17 00:00:00 2001 From: fiaxh Date: Mon, 7 Jun 2021 10:00:47 -0600 Subject: [PATCH] Don't remove characters after '#' in filename --- plugins/http-files/src/file_provider.vala | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/http-files/src/file_provider.vala b/plugins/http-files/src/file_provider.vala index 715f3e62..025b7c47 100644 --- a/plugins/http-files/src/file_provider.vala +++ b/plugins/http-files/src/file_provider.vala @@ -138,10 +138,11 @@ public class FileProvider : Dino.FileProvider, Object { } private string extract_file_name_from_url(string url) { - string ret = Uri.unescape_string(url.substring(url.last_index_of("/") + 1)); + string ret = url; if (ret.contains("#")) { ret = ret.substring(0, ret.last_index_of("#")); } + ret = Uri.unescape_string(ret.substring(ret.last_index_of("/") + 1)); return ret; }