From 50f36fa10742a1d68e70c2256f69786e59a6ae8c Mon Sep 17 00:00:00 2001 From: Kapu1178 <75460809+Kapu1178@users.noreply.github.com> Date: Sat, 23 Dec 2023 03:17:11 -0500 Subject: [PATCH] Updates `rustg_file_exists()` macro to remove user error (#158) --- dmsrc/file.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dmsrc/file.dm b/dmsrc/file.dm index c18d3f8a..8d64b72b 100644 --- a/dmsrc/file.dm +++ b/dmsrc/file.dm @@ -1,5 +1,5 @@ #define rustg_file_read(fname) RUSTG_CALL(RUST_G, "file_read")(fname) -#define rustg_file_exists(fname) RUSTG_CALL(RUST_G, "file_exists")(fname) +#define rustg_file_exists(fname) (RUSTG_CALL(RUST_G, "file_exists")(fname) == "true") #define rustg_file_write(text, fname) RUSTG_CALL(RUST_G, "file_write")(text, fname) #define rustg_file_append(text, fname) RUSTG_CALL(RUST_G, "file_append")(text, fname) #define rustg_file_get_line_count(fname) text2num(RUSTG_CALL(RUST_G, "file_get_line_count")(fname))