From e380075852310c8b14ad716c2f4fcd879b55254b Mon Sep 17 00:00:00 2001 From: Pierre-Nicolas Clauss Date: Thu, 19 Oct 2023 12:54:35 +0200 Subject: [PATCH] fix: standard library search paths Path construction for locating the standard library expects ending slashes. --- src/utils/file_utils.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/utils/file_utils.c b/src/utils/file_utils.c index 6d9f9cc81..d626e6c12 100644 --- a/src/utils/file_utils.c +++ b/src/utils/file_utils.c @@ -381,15 +381,15 @@ const char *find_lib_dir(void) path[strlen_path - 1] = '\0'; } const char *lib_path = NULL; - if ((lib_path = lib_find(path, "/../lib/c3"))) goto DONE; + if ((lib_path = lib_find(path, "/../lib/c3/"))) goto DONE; if ((lib_path = lib_find(path, "/../lib/"))) goto DONE; - if ((lib_path = lib_find(path, "/lib/c3"))) goto DONE; + if ((lib_path = lib_find(path, "/lib/c3/"))) goto DONE; if ((lib_path = lib_find(path, "/lib/"))) goto DONE; - if ((lib_path = lib_find(path, "/c3"))) goto DONE; + if ((lib_path = lib_find(path, "/c3/"))) goto DONE; if ((lib_path = lib_find(path, "/"))) goto DONE; - if ((lib_path = lib_find(path, "/../c3"))) goto DONE; + if ((lib_path = lib_find(path, "/../c3/"))) goto DONE; if ((lib_path = lib_find(path, "/../"))) goto DONE; - if ((lib_path = lib_find(path, "/../../lib/c3"))) goto DONE; + if ((lib_path = lib_find(path, "/../../lib/c3/"))) goto DONE; if ((lib_path = lib_find(path, "/../../lib/"))) goto DONE; DEBUG_LOG("Could not find the standard library /lib/std/");