From 6adbab0bf63c860db57d37c26280bf93eb53145f Mon Sep 17 00:00:00 2001 From: Michael Hackstein Date: Mon, 9 Mar 2015 14:46:00 +0100 Subject: [PATCH] Changed internal app validation path to be absolute and not relative to the user defined js app path --- js/server/modules/org/arangodb/foxx/arangoApp.js | 7 +++++-- js/server/modules/org/arangodb/foxx/manager.js | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/js/server/modules/org/arangodb/foxx/arangoApp.js b/js/server/modules/org/arangodb/foxx/arangoApp.js index 8a098fafd0..20c1874e56 100644 --- a/js/server/modules/org/arangodb/foxx/arangoApp.js +++ b/js/server/modules/org/arangodb/foxx/arangoApp.js @@ -141,7 +141,10 @@ var isSystemMount = function(mount) { /// @brief returns the root path for application. Knows about system apps //////////////////////////////////////////////////////////////////////////////// -var computeRootAppPath = function(mount) { +var computeRootAppPath = function(mount, isValidation) { + if (isValidation) { + return ""; + } if (isSystemMount(mount)) { return module.systemAppPath(); } @@ -168,7 +171,7 @@ var computeRootAppPath = function(mount) { } this._name = this._manifest.name; this._version = this._manifest.version; - this._root = computeRootAppPath(config.mount); + this._root = computeRootAppPath(config.mount, config.id === "__internal"); this._path = config.path; this._options = config.options; this._mount = config.mount; diff --git a/js/server/modules/org/arangodb/foxx/manager.js b/js/server/modules/org/arangodb/foxx/manager.js index a6122f7960..b33c99da8b 100644 --- a/js/server/modules/org/arangodb/foxx/manager.js +++ b/js/server/modules/org/arangodb/foxx/manager.js @@ -391,7 +391,7 @@ var fakeAppConfig = function(path) { var file = fs.join(path, "manifest.json"); return { - id: "/internal", + id: "__internal", root: "", path: path, options: {},