summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/loadlib.js3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/loadlib.js b/src/loadlib.js
index c70e7f9..c43f498 100644
--- a/src/loadlib.js
+++ b/src/loadlib.js
@@ -88,12 +88,11 @@ if (!WEB) {
try {
fd = fs.openSync(lua.to_jsstring(filename), 'r');
+ fs.closeSync(fd);
} catch (e) {
return false;
}
- fs.closeSync(fd);
-
return true;
};
}