mirror of https://gitee.com/bigwinds/arangodb
Merge branch '1.4' of https://github.com/triAGENS/ArangoDB into 1.4
Conflicts: CHANGELOG
This commit is contained in:
commit
a9c2dcc83d
|
@ -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
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue