From 1fb38d78647d7f514fa53b1de25e86dc67363c97 Mon Sep 17 00:00:00 2001 From: hogliux Date: Fri, 24 Nov 2017 11:13:51 +0000 Subject: [PATCH] URL: Fixed an issue when decoding local file URLs which contain a '+' in their paths --- modules/juce_core/network/juce_URL.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/juce_core/network/juce_URL.cpp b/modules/juce_core/network/juce_URL.cpp index 3dd57f68f1..5adbbff722 100644 --- a/modules/juce_core/network/juce_URL.cpp +++ b/modules/juce_core/network/juce_URL.cpp @@ -362,7 +362,7 @@ File URL::fileFromFileSchemeURL (const URL& fileURL) return {}; } - auto path = removeEscapeChars (fileURL.getDomain()); + auto path = removeEscapeChars (fileURL.getDomain()).replace ("+", "%2B"); #ifndef JUCE_WINDOWS path = File::getSeparatorString() + path; @@ -371,7 +371,7 @@ File URL::fileFromFileSchemeURL (const URL& fileURL) auto urlElements = StringArray::fromTokens (fileURL.getSubPath(), "/", ""); for (auto urlElement : urlElements) - path += File::getSeparatorString() + removeEscapeChars (urlElement); + path += File::getSeparatorString() + removeEscapeChars (urlElement.replace ("+", "%2B")); return path; }