Browse Source

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

tags/2021-05-28
hogliux 7 years ago
parent
commit
1fb38d7864
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      modules/juce_core/network/juce_URL.cpp

+ 2
- 2
modules/juce_core/network/juce_URL.cpp 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;
}


Loading…
Cancel
Save