diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index c33e839ae6..e5b96529a8 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -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(); }); diff --git a/libraries/script-engine/src/FileScriptingInterface.cpp b/libraries/script-engine/src/FileScriptingInterface.cpp index c6a16e9d4c..cd9d92da8b 100644 --- a/libraries/script-engine/src/FileScriptingInterface.cpp +++ b/libraries/script-engine/src/FileScriptingInterface.cpp @@ -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