mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-07-23 10:04:00 +02:00
Fix MS15721: Delete app.json if installed script isn't running
This commit is contained in:
parent
389bddb0f4
commit
d4a19e7bc9
1 changed files with 6 additions and 3 deletions
|
@ -227,10 +227,13 @@ QString QmlCommerce::getInstalledApps() {
|
||||||
QString scriptURL = appFileJsonObject["scriptURL"].toString();
|
QString scriptURL = appFileJsonObject["scriptURL"].toString();
|
||||||
|
|
||||||
// If the script .app.json is on the user's local disk but the associated script isn't running
|
// If the script .app.json is on the user's local disk but the associated script isn't running
|
||||||
// for some reason, start that script again.
|
// for some reason (i.e. the user stopped it from Running Scripts),
|
||||||
|
// delete the .app.json from the user's local disk.
|
||||||
if (!runningScripts.contains(scriptURL)) {
|
if (!runningScripts.contains(scriptURL)) {
|
||||||
if ((DependencyManager::get<ScriptEngines>()->loadScript(scriptURL.trimmed())).isNull()) {
|
if (!appFile.remove()) {
|
||||||
qCDebug(commerce) << "Couldn't start script while checking installed apps.";
|
qCWarning(commerce)
|
||||||
|
<< "Couldn't delete local .app.json file (app's script isn't running). App filename is:"
|
||||||
|
<< appFileName;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue