Move DomainServer script location to app data directory

This commit is contained in:
Ryan Huffman 2016-01-15 10:36:09 -08:00
parent a7429d6331
commit a5eb54b1b7
2 changed files with 4 additions and 1 deletions

View file

@ -35,6 +35,7 @@
#include <ShutdownEventListener.h> #include <ShutdownEventListener.h>
#include <UUID.h> #include <UUID.h>
#include <LogHandler.h> #include <LogHandler.h>
#include <ServerPathUtils.h>
#include "DomainServerNodeData.h" #include "DomainServerNodeData.h"
#include "NodeConnectionData.h" #include "NodeConnectionData.h"
@ -1068,7 +1069,7 @@ QJsonObject DomainServer::jsonObjectForNode(const SharedNodePointer& node) {
const char ASSIGNMENT_SCRIPT_HOST_LOCATION[] = "resources/web/assignment"; const char ASSIGNMENT_SCRIPT_HOST_LOCATION[] = "resources/web/assignment";
QString pathForAssignmentScript(const QUuid& assignmentUUID) { QString pathForAssignmentScript(const QUuid& assignmentUUID) {
QString newPath(ASSIGNMENT_SCRIPT_HOST_LOCATION); QString newPath { ServerPathUtils::getDataDirectory() + "/" + QString(ASSIGNMENT_SCRIPT_HOST_LOCATION) };
newPath += "/scripts/"; newPath += "/scripts/";
// append the UUID for this script as the new filename, remove the curly braces // append the UUID for this script as the new filename, remove the curly braces
newPath += uuidStringWithoutCurlyBraces(assignmentUUID); newPath += uuidStringWithoutCurlyBraces(assignmentUUID);

View file

@ -12,11 +12,13 @@
#include "udt/PacketHeaders.h" #include "udt/PacketHeaders.h"
#include "SharedUtil.h" #include "SharedUtil.h"
#include "UUID.h" #include "UUID.h"
#include "ServerPathUtils.h"
#include <QtCore/QDataStream> #include <QtCore/QDataStream>
#include <ApplicationVersion.h> #include <ApplicationVersion.h>
#include "Assignment.h" #include "Assignment.h"
#include <QtCore/QStandardPaths>
Assignment::Type Assignment::typeForNodeType(NodeType_t nodeType) { Assignment::Type Assignment::typeForNodeType(NodeType_t nodeType) {
switch (nodeType) { switch (nodeType) {