We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7de8a01 commit bc7ffb3Copy full SHA for bc7ffb3
app/modules/file.c
@@ -126,15 +126,16 @@ static int file_close( lua_State* L )
126
ud = (file_fd_ud *)luaL_checkudata(L, 1, "file.obj");
127
}
128
129
- // unref default file descriptor
130
- luaL_unref( L, LUA_REGISTRYINDEX, file_fd_ref );
131
- file_fd_ref = LUA_NOREF;
132
-
133
if(ud->fd){
134
vfs_close(ud->fd);
135
// mark as closed
136
ud->fd = 0;
137
+
+ // unref default file descriptor
+ luaL_unref( L, LUA_REGISTRYINDEX, file_fd_ref );
+ file_fd_ref = LUA_NOREF;
138
139
return 0;
140
141
0 commit comments