summaryrefslogtreecommitdiff
path: root/src/defs.js
diff options
context:
space:
mode:
authorBenoit Giannangeli <giann008@gmail.com>2017-05-03 13:51:20 +0200
committerBenoit Giannangeli <giann008@gmail.com>2017-05-03 15:07:21 +0200
commit278fd3edb6ead6cd65c2293f823887d19e4fbc8e (patch)
tree3ad7b42a93bd51d856e0ccef43395fa1b64fe890 /src/defs.js
parentd231ed14d0816eb26856e948a9ab72f64d46c1eb (diff)
downloadfengari-278fd3edb6ead6cd65c2293f823887d19e4fbc8e.tar.gz
fengari-278fd3edb6ead6cd65c2293f823887d19e4fbc8e.tar.bz2
fengari-278fd3edb6ead6cd65c2293f823887d19e4fbc8e.zip
require
Diffstat (limited to 'src/defs.js')
-rw-r--r--src/defs.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/defs.js b/src/defs.js
index c580ee5..3b5a923 100644
--- a/src/defs.js
+++ b/src/defs.js
@@ -294,6 +294,9 @@ module.exports.LUA_VDIR = LUA_VDIR;
let os = false;
if (typeof require === "function" && (os = require('os')) && typeof os.platform === "function" && os.platform() === 'win32') {
+ const LUA_DIRSEP = "\\";
+ module.exports.LUA_DIRSEP = LUA_DIRSEP;
+
/*
** In Windows, any exclamation mark ('!') in the path is replaced by the
** path of the directory of the executable file of the current process.
@@ -320,6 +323,9 @@ if (typeof require === "function" && (os = require('os')) && typeof os.platform
LUA_CDIR + "loadall.dll;.\\?.dll";
module.exports.LUA_CPATH_DEFAULT = LUA_CPATH_DEFAULT;
} else {
+ const LUA_DIRSEP = "/";
+ module.exports.LUA_DIRSEP = LUA_DIRSEP;
+
const LUA_ROOT = "/usr/local/";
module.exports.LUA_ROOT = LUA_ROOT;