mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 13:58:51 +02:00
Merge pull request #3523 from birarda/master
add debug to domain server if script not saved
This commit is contained in:
commit
78670245df
1 changed files with 15 additions and 10 deletions
|
@ -1261,7 +1261,7 @@ bool DomainServer::handleHTTPRequest(HTTPConnection* connection, const QUrl& url
|
||||||
|
|
||||||
// create a file with the GUID of the assignment in the script host location
|
// create a file with the GUID of the assignment in the script host location
|
||||||
QFile scriptFile(newPath);
|
QFile scriptFile(newPath);
|
||||||
scriptFile.open(QIODevice::WriteOnly);
|
if (scriptFile.open(QIODevice::WriteOnly)) {
|
||||||
scriptFile.write(formData[0].second);
|
scriptFile.write(formData[0].second);
|
||||||
|
|
||||||
qDebug() << qPrintable(QString("Saved a script for assignment at %1%2")
|
qDebug() << qPrintable(QString("Saved a script for assignment at %1%2")
|
||||||
|
@ -1271,6 +1271,11 @@ bool DomainServer::handleHTTPRequest(HTTPConnection* connection, const QUrl& url
|
||||||
SharedAssignmentPointer sharedScriptedAssignment(scriptAssignment);
|
SharedAssignmentPointer sharedScriptedAssignment(scriptAssignment);
|
||||||
_unfulfilledAssignments.enqueue(sharedScriptedAssignment);
|
_unfulfilledAssignments.enqueue(sharedScriptedAssignment);
|
||||||
_allAssignments.insert(sharedScriptedAssignment->getUUID(), sharedScriptedAssignment);
|
_allAssignments.insert(sharedScriptedAssignment->getUUID(), sharedScriptedAssignment);
|
||||||
|
} else {
|
||||||
|
// unable to save script for assignment - we shouldn't be here but debug it out
|
||||||
|
qDebug() << "Unable to save a script for assignment at" << newPath;
|
||||||
|
qDebug() << "Script will not be added to queue";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// respond with a 200 code for successful upload
|
// respond with a 200 code for successful upload
|
||||||
|
|
Loading…
Reference in a new issue