1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

X11: Properly escape "+" symbols in dragged/dropped filenames

This commit is contained in:
reuk 2020-12-17 17:49:48 +00:00
parent dc3e0d1571
commit 5354d01a89

View file

@ -287,8 +287,11 @@ public:
if (XWindowSystemUtilities::Atoms::isMimeTypeFile (getDisplay(), dragAndDropCurrentMimeType))
{
for (int i = 0; i < lines.size(); ++i)
dragInfo.files.add (URL::removeEscapeChars (lines[i].replace ("file://", String(), true)));
for (const auto& line : lines)
{
const auto escaped = line.replace ("+", "%2B").replace ("file://", String(), true);
dragInfo.files.add (URL::removeEscapeChars (escaped));
}
dragInfo.files.trim();
dragInfo.files.removeEmptyStrings();