From ed540c8e00fa6222d7fa93289f052cd6f9f3a4e9 Mon Sep 17 00:00:00 2001 From: Stefanos Kornilios Mitsis Poiitidis Date: Mon, 24 Feb 2025 05:22:51 +0200 Subject: [PATCH] skip ./ on relative paths --- miami/skel/crossplatform.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/miami/skel/crossplatform.cpp b/miami/skel/crossplatform.cpp index 39a53e3f..2b9dae3d 100644 --- a/miami/skel/crossplatform.cpp +++ b/miami/skel/crossplatform.cpp @@ -194,6 +194,10 @@ char* casepath(char const* path, bool checkPathFirst) } size_t l = strlen(path); + if (l > 2 && path[0] == '.' && (path[1] == '/' || path[1] == '\\')) { + // remove ./ from the start of the path + path += 2; + } char* p = (char*)alloca(l + 1); char* out = (char*)malloc(l + 3); // for extra ./ strcpy(p, path);