1
0
mirror of https://github.com/janet-lang/janet synced 2024-11-05 16:26:17 +00:00

Windows has different defines for file modes.

This commit is contained in:
Calvin Rose 2019-03-30 13:09:35 -04:00
parent 8af28d3fa5
commit 61c0a4bc87

View File

@ -395,8 +395,8 @@ static const uint8_t *janet_decode_permissions(unsigned short m) {
static const uint8_t *janet_decode_mode(unsigned short m) { static const uint8_t *janet_decode_mode(unsigned short m) {
const char *str = "other"; const char *str = "other";
if (S_ISREG(m)) str = "file"; if (m & _S_IFREG(m)) str = "file";
else if (S_ISDIR(m)) str = "directory"; else if (m & _S_IFDIR(m)) str = "directory";
return janet_ckeyword(str); return janet_ckeyword(str);
} }
#else #else