1
0
Fork 0

simplifications

This commit is contained in:
Jan Steemann 2015-10-06 11:58:23 +02:00
parent 391e9b1693
commit beaf3acbd3
2 changed files with 4 additions and 20 deletions

View File

@ -609,22 +609,6 @@ Module._extensions['.coffee'] = function(module, filename) {
module._compile(cs.compile(stripBOM(content), {bare: true}), filename);
};
// backwards compatibility
Module._oldAppPath = function () {
if (internal.appPath === undefined) {
return undefined;
}
return fs.join(internal.appPath, 'databases', internal.db._name());
};
// backwards compatibility
Module._devAppPath = function () {
if (internal.devAppPath === undefined) {
return undefined;
}
return fs.join(internal.devAppPath, 'databases', internal.db._name());
};
// backwards compatibility
Module.Module = Module;

View File

@ -39,8 +39,8 @@
var internal = require("internal");
var fs = require("fs");
var console = require("console");
var Module = require('module');
var userManager = require("org/arangodb/users");
var FoxxService = require("org/arangodb/foxx/service");
require("org/arangodb/cluster"); // TODO Is this unused or magic?
var currentVersion = require("org/arangodb/database-version").CURRENT_VERSION;
var sprintf = internal.sprintf;
@ -1324,7 +1324,7 @@
var appsToZip = aal.byExample({type: "app", isSystem: false});
while (appsToZip.hasNext()) {
tmp = appsToZip.next();
path = fs.join(Module._oldAppPath(), tmp.path);
path = fs.join(FoxxService._oldAppPath, tmp.path);
try {
mapAppZip[tmp.app] = fmUtils.zipDirectory(path);
} catch (e) {
@ -1334,7 +1334,7 @@
// 2. If development mode, Zip all development APPs and create a map name => zipFile
var devPath = Module._devAppPath();
var devPath = FoxxService._devAppPath;
var mapDevAppZip = {};
var i;
if (devPath !== undefined) {
@ -1354,7 +1354,7 @@
// 3. Remove old appPath
try {
fs.removeDirectoryRecursive(Module._oldAppPath(), true);
fs.removeDirectoryRecursive(FoxxService._oldAppPath, true);
} catch(e) {
}