291 skip++; // skip first '/' |
291 skip++; // skip first '/' |
292 } |
292 } |
293 |
293 |
294 |
294 |
295 cxmutstr base = cx_strdup(cx_strn(full_path, end)); |
295 cxmutstr base = cx_strdup(cx_strn(full_path, end)); |
296 cxmutstr base_path = cx_strdup(cx_strcast(base)); |
296 cxmutstr base_path = cx_strcat(2, cx_strcast(base), CX_STR("/")); |
297 cxstring path = cx_strsubs(fpath, end + skip); |
297 cxstring path = cx_strsubs(fpath, end + skip); |
298 |
298 |
299 cxstring *pathelms; |
299 cxstring *pathelms; |
300 size_t nelm = 0; |
300 size_t nelm = 0; |
301 |
301 |
329 cxmutstr m = cx_strdup(c); |
329 cxmutstr m = cx_strdup(c); |
330 elms[j].name = m.ptr; |
330 elms[j].name = m.ptr; |
331 elms[j].name_len = m.length; |
331 elms[j].name_len = m.length; |
332 |
332 |
333 size_t elm_path_len = c.ptr + c.length - full_path; |
333 size_t elm_path_len = c.ptr + c.length - full_path; |
334 cxmutstr elm_path = cx_strdup(cx_strn(full_path, elm_path_len)); |
334 cxmutstr elm_path = cx_strcat(2, cx_strn(full_path, elm_path_len), CX_STR("/")); |
335 elms[j].path = elm_path.ptr; |
335 elms[j].path = elm_path.ptr; |
336 elms[j].path_len = elm_path.length; |
336 elms[j].path_len = elm_path.length; |
337 |
337 |
338 j++; |
338 j++; |
339 } |
339 } |