Fix qt standardpaths on UNC paths
authorAndre Heinecke <aheinecke@intevation.de>
Thu, 1 Mar 2018 07:31:51 +0000 (08:31 +0100)
committerAndre Heinecke <aheinecke@intevation.de>
Thu, 1 Mar 2018 07:31:51 +0000 (08:31 +0100)
* patches/qtbase/config-standardpaths.patch: Replace backslashes
by one slash and not two.

--
This fixes the creation of invalid \\\\server paths when the
appdata directory is redirected to an UNC path.

GnuPG-Bug-Id: T3818

patches/qtbase/config-standardpaths.patch

index c1483e6..55d6610 100755 (executable)
@@ -98,7 +98,7 @@ diff -Nru qtbase-5.6.1.orig/src/corelib/io/qstandardpaths.cpp qtbase-5.6.1/src/c
 +#ifdef Q_OS_WIN
 +        wchar_t expandedPath[MAX_PATH] = {0};
 +        if (ExpandEnvironmentStrings((wchar_t*)value.utf16(), expandedPath, MAX_PATH)) {
-+            return QString::fromWCharArray(expandedPath).replace("\\", "//");
++            return QString::fromWCharArray(expandedPath).replace("\\", "/");
 +        }
 +        return value;
 +#endif