TestClexer fix for github ubuntu worker

This commit is contained in:
Krzosa Karol
2024-01-28 09:09:50 +01:00
parent bf0d18bc00
commit 32deac08e0

View File

@@ -618,15 +618,17 @@ OS_API OS_Result OS_AppendFile(S8_String path, S8_String string) {
} }
OS_API S8_String OS_ReadFile(MA_Arena *arena, S8_String path) { OS_API S8_String OS_ReadFile(MA_Arena *arena, S8_String path) {
// ftell returns insane size if file is a directory **on some machines** KEKW S8_String result = {};
// ftell returns insane size if file is
// a directory **on some machines** KEKW
if (OS_IsDir(path)) { if (OS_IsDir(path)) {
return {}; return result;
} }
MA_Checkpoint scratch = MA_GetScratch1(arena); MA_Checkpoint scratch = MA_GetScratch1(arena);
path = S8_Copy(scratch.arena, path); path = S8_Copy(scratch.arena, path);
S8_String result = {};
FILE *f = fopen(path.str, "rb"); FILE *f = fopen(path.str, "rb");
if (f) { if (f) {
fseek(f, 0, SEEK_END); fseek(f, 0, SEEK_END);