diff -r 0d25f15e2625 -r 6bd37fe6d905 application/window.c --- a/application/window.c Wed Oct 23 18:25:43 2024 +0200 +++ b/application/window.c Wed Oct 23 21:46:43 2024 +0200 @@ -295,6 +295,8 @@ cxmutstr base = cx_strdup(cx_strn(full_path, end)); cxmutstr base_path = cx_strcat(2, cx_strcast(base), CX_STR("/")); cxstring path = cx_strsubs(fpath, end + skip); + + cxstring trail = cx_str(len > 0 && full_path[len-1] == '/' ? "/" : ""); cxstring *pathelms; size_t nelm = 0; @@ -331,7 +333,7 @@ elms[j].name_len = m.length; size_t elm_path_len = c.ptr + c.length - full_path; - cxmutstr elm_path = cx_strcat(2, cx_strn(full_path, elm_path_len), CX_STR("/")); + cxmutstr elm_path = cx_strcat(2, cx_strn(full_path, elm_path_len), i+1 < nelm ? CX_STR("/") : trail); elms[j].path = elm_path.ptr; elms[j].path_len = elm_path.length;