From 61c0a4bc873fbb8b79947d58ccbbe3d11934f50f Mon Sep 17 00:00:00 2001 From: Calvin Rose Date: Sat, 30 Mar 2019 13:09:35 -0400 Subject: [PATCH] Windows has different defines for file modes. --- src/core/os.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/os.c b/src/core/os.c index 8b88f464..ad0e6c0f 100644 --- a/src/core/os.c +++ b/src/core/os.c @@ -395,8 +395,8 @@ static const uint8_t *janet_decode_permissions(unsigned short m) { static const uint8_t *janet_decode_mode(unsigned short m) { const char *str = "other"; - if (S_ISREG(m)) str = "file"; - else if (S_ISDIR(m)) str = "directory"; + if (m & _S_IFREG(m)) str = "file"; + else if (m & _S_IFDIR(m)) str = "directory"; return janet_ckeyword(str); } #else