host mli - opening/closing a directory would close fd 0 (aka stdin).

This commit is contained in:
Kelvin Sherlock 2019-02-17 21:18:11 -05:00
parent 78591a37d0
commit 682dc0c562

View File

@ -1053,6 +1053,11 @@ static int mli_open(unsigned dcb, const char *name, const char *path) {
word16 terr = host_get_file_info(path, &fi);
if (terr) return terr;
#if _WIN32
file->h = INVALID_HANDLE_VALUE;
#else
file->fd = -1;
#endif
if (fi.storage_type == 0x0f || fi.storage_type == 0x0d) {
unsigned blocks;