App: workaround for boost's file_lock with version < 1.76 on Windows

This commit is contained in:
wmayer
2021-12-20 16:08:47 +01:00
parent c944c559b7
commit dcb0c4c75f

View File

@@ -3069,6 +3069,15 @@ std::tuple<QString, QString, QString, QString> 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);