App: workaround for boost's file_lock with version < 1.76 on Windows
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user