File tree Expand file tree Collapse file tree 3 files changed +9
-3
lines changed Expand file tree Collapse file tree 3 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -342,7 +342,9 @@ void GlobePlugin::run()
342342 }
343343 else
344344 {
345- QString cacheDirectory = settings.value ( " cache/directory" , QgsApplication::qgisSettingsDirPath () + " cache" ).toString ();
345+ QString cacheDirectory = settings.value ( " cache/directory" ).toString ();
346+ if ( cacheDirectory.isEmpty () )
347+ cacheDirectory = QgsApplication::qgisSettingsDirPath () + " cache" ;
346348 osgEarth::Drivers::FileSystemCacheOptions cacheOptions;
347349 cacheOptions.rootPath () = cacheDirectory.toStdString ();
348350
Original file line number Diff line number Diff line change @@ -37,7 +37,9 @@ int QgsWFSUtils::gmCounter = 0;
3737QString QgsWFSUtils::getBaseCacheDirectory ( bool createIfNotExisting )
3838{
3939 QSettings settings;
40- QString cacheDirectory = settings.value ( " cache/directory" , QgsApplication::qgisSettingsDirPath () + " cache" ).toString ();
40+ QString cacheDirectory = settings.value ( " cache/directory" ).toString ();
41+ if ( cacheDirectory.isEmpty () )
42+ cacheDirectory = QgsApplication::qgisSettingsDirPath () + " cache" ;
4143 if ( createIfNotExisting )
4244 {
4345 QMutexLocker locker ( &gmMutex );
Original file line number Diff line number Diff line change @@ -112,7 +112,9 @@ void QgsServer::setupNetworkAccessManager()
112112 QSettings settings;
113113 QgsNetworkAccessManager *nam = QgsNetworkAccessManager::instance ();
114114 QNetworkDiskCache *cache = new QNetworkDiskCache ( nullptr );
115- QString cacheDirectory = settings.value ( " cache/directory" , QgsApplication::qgisSettingsDirPath () + " cache" ).toString ();
115+ QString cacheDirectory = settings.value ( " cache/directory" ).toString ();
116+ if ( cacheDirectory.isEmpty () )
117+ cacheDirectory = QgsApplication::qgisSettingsDirPath () + " cache" ;
116118 qint64 cacheSize = settings.value ( " cache/size" , 50 * 1024 * 1024 ).toULongLong ();
117119 QgsMessageLog::logMessage ( QString ( " setCacheDirectory: %1" ).arg ( cacheDirectory ), " Server" , QgsMessageLog::INFO );
118120 QgsMessageLog::logMessage ( QString ( " setMaximumCacheSize: %1" ).arg ( cacheSize ), " Server" , QgsMessageLog::INFO );
You can’t perform that action at this time.
0 commit comments