| 330 } else { |
330 } else { |
| 331 free(cwd); |
331 free(cwd); |
| 332 return 0; |
332 return 0; |
| 333 } |
333 } |
| 334 } |
334 } |
| 335 cxmutstr wd = cx_str(cwd); |
335 cxmutstr wd = cx_mutstr(cwd); |
| 336 cxmutstr pp = cx_str((char*)path); |
336 cxmutstr pp = cx_mutstr((char*)path); |
| 337 |
337 |
| 338 p = cx_strcat(CX_NULLSTR, 3, wd, cx_strn("/", 1), pp); |
338 p = cx_strcat(CX_NULLSTR, 3, wd, cx_strn("/", 1), pp); |
| 339 } else { |
339 } else { |
| 340 p = cx_strdup(cx_str((char*)path)); |
340 p = cx_strdup(path); |
| 341 } |
341 } |
| 342 if(p.ptr[p.length-1] == '/') { |
342 if(p.ptr[p.length-1] == '/') { |
| 343 p.ptr[p.length-1] = 0; |
343 p.ptr[p.length-1] = 0; |
| 344 p.length--; |
344 p.length--; |
| 345 } |
345 } |