From 34df9f3d4cc5336a438c5bf28214880e2bd42676 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Minisini?= Date: Sat, 13 Aug 2016 14:58:28 +0000 Subject: [PATCH] [INTERPRETER] * NEW: When searching a relative path inside an archive, ignore trailing slashes: "foo/bar/" and "/foo/bar//" are now the same as "foo/bar". git-svn-id: svn://localhost/gambas/trunk@7837 867c0c6c-44f3-4631-809d-bfa615b0a4ec --- main/share/gb_arch_temp.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/main/share/gb_arch_temp.h b/main/share/gb_arch_temp.h index a7b7ef27e..72d2be823 100644 --- a/main/share/gb_arch_temp.h +++ b/main/share/gb_arch_temp.h @@ -296,6 +296,9 @@ bool ARCH_find(ARCH *arch, const char *path, int len_path, ARCH_FIND *find) if (len_path <= 0) len_path = strlen(path); + while (len_path >= 2 && path[len_path - 1] == '/') + len_path--; + if (get_absolute_path(path, len_path, tpath, &len_tpath)) return TRUE;