From e09224529092ebe2c27b60504213dfdeba777c1c Mon Sep 17 00:00:00 2001 From: luboslenco Date: Mon, 6 Jul 2026 07:26:41 +0200 Subject: [PATCH] base: fix path_to_relative --- base/sources/iron_path.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/base/sources/iron_path.c b/base/sources/iron_path.c index bf20b192..e176b8df 100644 --- a/base/sources/iron_path.c +++ b/base/sources/iron_path.c @@ -169,6 +169,9 @@ char *path_data(void) { char *path_to_relative(char *from, char *to) { any_array_t *a = string_split(from, PATH_SEP); any_array_t *b = string_split(to, PATH_SEP); + if (a->length > 0 && !path_is_folder(from)) { + array_pop(a); + } while (a->length > 0 && b->length > 0) { char *a0 = a->buffer[0]; char *b0 = b->buffer[0];