aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfiaxh <git@lightrise.org>2021-06-07 10:00:47 -0600
committerfiaxh <git@lightrise.org>2021-06-07 10:00:47 -0600
commitce292d03e37f146853417855986bf5541b50d2ae (patch)
treeace1fbb93ab07bde314aa2f382fc87591607ab6e
parent0c8d25b7a3e7a10a506f1e19b868fe9b0c761495 (diff)
downloaddino-ce292d03e37f146853417855986bf5541b50d2ae.tar.gz
dino-ce292d03e37f146853417855986bf5541b50d2ae.zip
Don't remove characters after '#' in filename
-rw-r--r--plugins/http-files/src/file_provider.vala3
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/http-files/src/file_provider.vala b/plugins/http-files/src/file_provider.vala
index 0a68a1fb..cd7b25b7 100644
--- a/plugins/http-files/src/file_provider.vala
+++ b/plugins/http-files/src/file_provider.vala
@@ -142,10 +142,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;
}