1
0
Fork 0
Conflicts:
	CHANGELOG
This commit is contained in:
Jan Steemann 2014-01-10 16:43:18 +01:00
commit a9c2dcc83d
8 changed files with 23 additions and 12 deletions

View File

@ -3,6 +3,8 @@ v1.4.5-rc1 (XXXX-XX-XX)
* defer evaluation of AQL subqueries and logical operators (lazy evaluation)
* Updated font in WebFrontend, it now contains a version that renders properly on windows
* generally allow function return values as call parameters to AQL functions
* fixed potential deadlock in global context method execution

View File

@ -1082,25 +1082,34 @@ function require (path) {
return null;
}
// try to load the file
// try to load the file
var n;
if (p === "") {
n = "." + main + ".js";
}
else if (p[p.length - 1] === '/') {
n = p + main.substr(1) + ".js";
}
else {
n = p + main + ".js";
if (p !== "" && p[p.length - 1] === '/') {
p = p.substr(0, p.length - 1);
}
n = p + main + ".js";
if (fs.exists(n)) {
return { name: main,
path: 'file://' + n,
content: fs.read(n) };
}
n = p + main + "/index.js";
if (fs.exists(n)) {
return { name: main,
path: 'file://' + n,
content: fs.read(n) };
}
n = p + main;
if (fs.exists(n)) {
return { name: main,
path: 'file://' + n,
content: fs.read(n) };
}
return null;
};
@ -1135,7 +1144,7 @@ function require (path) {
if (fs.exists(n)) {
try {
var desc = JSON.parse(fs.read(n));
var mainfile = desc.main;
var mainfile = desc.main || "./index.js";
var file;
// the mainfile is always relative