From 0174a985ee1a078fb5c45f5d17d096155f8086c1 Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Wed, 1 Oct 2014 09:56:13 -0700 Subject: [PATCH] add a domain-server scripts folder that is ignored for clean symlink --- domain-server/resources/web/assignment/scripts/.gitignore | 4 ++++ domain-server/src/DomainServer.cpp | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 domain-server/resources/web/assignment/scripts/.gitignore diff --git a/domain-server/resources/web/assignment/scripts/.gitignore b/domain-server/resources/web/assignment/scripts/.gitignore new file mode 100644 index 0000000000..86d0cb2726 --- /dev/null +++ b/domain-server/resources/web/assignment/scripts/.gitignore @@ -0,0 +1,4 @@ +# Ignore everything in this directory +* +# Except this file +!.gitignore \ No newline at end of file diff --git a/domain-server/src/DomainServer.cpp b/domain-server/src/DomainServer.cpp index fb475f681d..639d32c823 100644 --- a/domain-server/src/DomainServer.cpp +++ b/domain-server/src/DomainServer.cpp @@ -1047,7 +1047,7 @@ const char ASSIGNMENT_SCRIPT_HOST_LOCATION[] = "resources/web/assignment"; QString pathForAssignmentScript(const QUuid& assignmentUUID) { QString newPath(ASSIGNMENT_SCRIPT_HOST_LOCATION); - newPath += "/"; + newPath += "/scripts/"; // append the UUID for this script as the new filename, remove the curly braces newPath += uuidStringWithoutCurlyBraces(assignmentUUID); return newPath; @@ -1086,7 +1086,7 @@ bool DomainServer::handleHTTPRequest(HTTPConnection* connection, const QUrl& url // via correct URL for the script so the client can download QUrl scriptURL = url; - scriptURL.setPath(URI_ASSIGNMENT + "/" + scriptURL.setPath(URI_ASSIGNMENT + "/scripts/" + uuidStringWithoutCurlyBraces(pendingData->getAssignmentUUID())); // have the HTTPManager serve the appropriate script file