1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-02-05 03:50:07 +00:00

URL: Fixed an issue when decoding local file URLs which contain a '+' in their paths

This commit is contained in:
hogliux 2017-11-24 11:13:51 +00:00
parent b288da58f0
commit 1fb38d7864

View file

@ -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;
}