mirror of
https://github.com/overte-org/overte.git
synced 2025-08-05 11:19:51 +02:00
Delete temporary directory after content has been used
This commit is contained in:
parent
7e8fc12258
commit
0ccff32365
2 changed files with 9 additions and 2 deletions
|
@ -5495,6 +5495,15 @@ void Application::addAssetToWorldUpload(QString path, QString mapping) {
|
|||
} else {
|
||||
addAssetToWorldSetMapping(mapping, hash);
|
||||
}
|
||||
|
||||
// Remove temporary directory created by Clara.io market place download.
|
||||
int index = path.lastIndexOf("/model_repo/");
|
||||
if (index > 0) {
|
||||
QString tempDir = path.left(index);
|
||||
qCDebug(interfaceapp) << "Removing temporary directory at: " + tempDir;
|
||||
QDir(tempDir).removeRecursively();
|
||||
}
|
||||
|
||||
upload->deleteLater();
|
||||
});
|
||||
|
||||
|
|
|
@ -51,8 +51,6 @@ void FileScriptingInterface::runUnzip(QString path, QUrl url, bool autoAdd) {
|
|||
} else {
|
||||
qDebug() << "unzip failed";
|
||||
}
|
||||
qDebug() << "Removing temporary directory at: " + tempDir;
|
||||
QDir(tempDir).removeRecursively();
|
||||
}
|
||||
|
||||
// fix to check that we are only referring to a temporary directory
|
||||
|
|
Loading…
Reference in a new issue