| 1015:b459361d98ad | 1016:ccde46662db7 |
|---|---|
| 168 } | 168 } |
| 169 } | 169 } |
| 170 | 170 |
| 171 static cxmutstr concat_path_s(cxstring base, cxstring path) { | 171 static cxmutstr concat_path_s(cxstring base, cxstring path) { |
| 172 if(!path.ptr) { | 172 if(!path.ptr) { |
| 173 path = CX_STR(""); | 173 path = cx_str(""); |
| 174 } | 174 } |
| 175 | 175 |
| 176 int add_separator = 0; | 176 int add_separator = 0; |
| 177 if(base.length != 0 && base.ptr[base.length-1] == '/') { | 177 if(base.length != 0 && base.ptr[base.length-1] == '/') { |
| 178 if(path.ptr[0] == '/') { | 178 if(path.ptr[0] == '/') { |
| 184 } | 184 } |
| 185 } | 185 } |
| 186 | 186 |
| 187 cxmutstr url; | 187 cxmutstr url; |
| 188 if(add_separator) { | 188 if(add_separator) { |
| 189 url = cx_strcat(3, base, CX_STR("/"), path); | 189 url = cx_strcat(3, base, cx_str("/"), path); |
| 190 } else { | 190 } else { |
| 191 url = cx_strcat(2, base, path); | 191 url = cx_strcat(2, base, path); |
| 192 } | 192 } |
| 193 | 193 |
| 194 return url; | 194 return url; |