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 b6406159bd
commit e9e9fcfd59
1 changed files with 5 additions and 0 deletions

View File

@ -1048,6 +1048,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;