1
0
mirror of https://github.com/janet-lang/janet synced 2025-01-14 09:25:41 +00:00

Merge branch 'master' of github.com:janet-lang/janet

This commit is contained in:
Calvin Rose 2020-01-21 17:48:54 -06:00
commit 8db68c04c4

View File

@ -290,7 +290,7 @@ static Janet cfun_io_fclose(int32_t argc, Janet *argv) {
janet_fixarity(argc, 1);
IOFile *iof = janet_getabstract(argv, 0, &cfun_io_filetype);
if (iof->flags & JANET_FILE_CLOSED)
janet_panic("file is closed");
return janet_wrap_nil();
if (iof->flags & (JANET_FILE_NOT_CLOSEABLE))
janet_panic("file not closable");
if (iof->flags & JANET_FILE_PIPED) {