Showing the changes to libraries/networking/src/BaseAssetScriptingInterface.cpp (1 of 2 files). Show all
Unified · Split
| @@ -42,7 +42,7 @@ bool BaseAssetScriptingInterface::initializeCache() { · 41 unmodified lines | |||
| 42 | if (!assetClient()) { | 42 | if (!assetClient()) { |
| 43 | return false; // not yet possible to initialize the cache | 43 | return false; // not yet possible to initialize the cache |
| 44 | } | 44 | } |
| 45 | if (!_cacheDirectory.isEmpty()) { | 45 | if (_cacheReady) { |
| 46 | return true; // cache is ready | 46 | return true; // cache is ready |
| 47 | } | 47 | } |
| 48 | 48 | ||
| @@ -51,7 +51,7 @@ bool BaseAssetScriptingInterface::initializeCache() { · 2 unmodified lines | |||
| 51 | 51 | ||
| 52 | Promise deferred = makePromise("BaseAssetScriptingInterface--queryCacheStatus"); | 52 | Promise deferred = makePromise("BaseAssetScriptingInterface--queryCacheStatus"); |
| 53 | deferred->then([this](QVariantMap result) { | 53 | deferred->then([this](QVariantMap result) { |
| 54 | _cacheDirectory = result.value("cacheDirectory").toString(); | 54 | _cacheReady = !result.value("cacheDirectory").toString().isEmpty(); |
| 55 | }); | 55 | }); |
| 56 | deferred->fail([](QString error) { | 56 | deferred->fail([](QString error) { |
| 57 | qDebug() << "BaseAssetScriptingInterface::queryCacheStatus ERROR" << QThread::currentThread() << error; | 57 | qDebug() << "BaseAssetScriptingInterface::queryCacheStatus ERROR" << QThread::currentThread() << error; |