From dcb0c4c75ff8efa5405345bc013311e4273099ee Mon Sep 17 00:00:00 2001 From: wmayer Date: Mon, 20 Dec 2021 16:08:47 +0100 Subject: [PATCH] App: workaround for boost's file_lock with version < 1.76 on Windows --- src/App/Application.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/App/Application.cpp b/src/App/Application.cpp index 9e99e96283..3a29d6add7 100644 --- a/src/App/Application.cpp +++ b/src/App/Application.cpp @@ -3069,6 +3069,15 @@ std::tuple getStandardPaths() #if defined(FC_OS_WIN32) configHome = getOldGenericDataLocation(QString()); dataHome = configHome; + + // On systems with non-7-bit-ASCII application data directories + // GetTempPathW will return a path in DOS format. This path will be + // accepted by boost's file_lock class. + // Since boost 1.76 there is now a version that accepts a wide string. +#if (BOOST_VERSION < 107600) + tempPath = QString::fromStdString(Base::FileInfo::getTempPath()); + cacheHome = tempPath; +#endif #endif return std::make_tuple(configHome, dataHome, cacheHome, tempPath);