aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2017-11-12 18:54:32 +1100
committerdaurnimator <quae@daurnimator.com>2017-11-12 20:33:19 +1100
commit1ba4c1ca128b49eea3dca8cc053fce817e1c0fef (patch)
treeb361f160e5dad28e6be9c8c9a6d7117281e0da2b /src
parent5d649170719e0b70028ce6bafac2fdfea52c0aa0 (diff)
downloadfengari-1ba4c1ca128b49eea3dca8cc053fce817e1c0fef.tar.gz
fengari-1ba4c1ca128b49eea3dca8cc053fce817e1c0fef.tar.bz2
fengari-1ba4c1ca128b49eea3dca8cc053fce817e1c0fef.zip
src/loadlib.js: Remove unwanted to_jsstring
Diffstat (limited to 'src')
-rw-r--r--src/loadlib.js5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/loadlib.js b/src/loadlib.js
index 2cd173f..8ae758b 100644
--- a/src/loadlib.js
+++ b/src/loadlib.js
@@ -118,15 +118,12 @@ if (!WEB) {
const fs = require('fs');
readable = function(filename) {
- let fd = false;
-
try {
- fd = fs.openSync(lua.to_jsstring(filename), 'r');
+ let fd = fs.openSync(Uint8Array.from(filename), 'r');
fs.closeSync(fd);
} catch (e) {
return false;
}
-
return true;
};
} else {