no need to call access() here
lua will report an error if the file is not found anyway
This commit is contained in:
@@ -157,11 +157,6 @@ int main(int argc, char **argv)
|
||||
signal(SIGCHLD, handle_sigchld);
|
||||
|
||||
if (argc >= 2) {
|
||||
if (!access(argv[1], F_OK) == 0) {
|
||||
fprintf(stderr, "File %s does not exist!\n", argv[1]);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
status = luaL_dofile(L, argv[1]);
|
||||
if (status) {
|
||||
fprintf(stderr, "Error: %s\n", lua_tostring(L, -1));
|
||||
|
||||
Reference in New Issue
Block a user