From e2af92b93483af7f9020986512c2b21018751cd3 Mon Sep 17 00:00:00 2001 From: Lassi Kortela Date: Mon, 2 Sep 2019 19:37:46 +0300 Subject: [PATCH] Fix bug where path.exists? would always return #t --- c/os_unix.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/c/os_unix.c b/c/os_unix.c index 19cb73b..9a4d0b8 100644 --- a/c/os_unix.c +++ b/c/os_unix.c @@ -99,10 +99,7 @@ int os_path_exists(const char *path) { struct stat st; - if (stat(path, &st) == -1) { - return FL_F; - } - return FL_T; + return stat(path, &st) != -1; } void os_setenv(const char *name, const char *value)