From 1ba4c1ca128b49eea3dca8cc053fce817e1c0fef Mon Sep 17 00:00:00 2001 From: daurnimator Date: Sun, 12 Nov 2017 18:54:32 +1100 Subject: src/loadlib.js: Remove unwanted to_jsstring --- src/loadlib.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src') 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 { -- cgit v1.2.3-70-g09d2