| ... | @@ -225,6 +225,11 @@ void os_path_extname(Buf *full_path, Buf *out_basename, Buf *out_extname) { | ... | @@ -225,6 +225,11 @@ void os_path_extname(Buf *full_path, Buf *out_basename, Buf *out_extname) { |
| 225 | } | 225 | } |
| 226 | | 226 | |
| 227 | void os_path_join(Buf *dirname, Buf *basename, Buf *out_full_path) { | 227 | void os_path_join(Buf *dirname, Buf *basename, Buf *out_full_path) { |
| | 228 | if (buf_len(dirname) == 0) { |
| | 229 | buf_init_from_buf(out_full_path, basename); |
| | 230 | return; |
| | 231 | } |
| | 232 | |
| 228 | buf_init_from_buf(out_full_path, dirname); | 233 | buf_init_from_buf(out_full_path, dirname); |
| 229 | uint8_t c = *(buf_ptr(out_full_path) + buf_len(out_full_path) - 1); | 234 | uint8_t c = *(buf_ptr(out_full_path) + buf_len(out_full_path) - 1); |
| 230 | if (!os_is_sep(c)) | 235 | if (!os_is_sep(c)) |