Build entry path: dir/suffix or just suffix if dir is empty. */
| 374 | |
| 375 | /* Build entry path: dir/suffix or just suffix if dir is empty. */ |
| 376 | static char *build_entry_path(const char *rel_path, const char *suffix) { |
| 377 | char *dir = path_dirname(rel_path); |
| 378 | char buf[PKGMAP_PATH_BUF]; |
| 379 | snprintf(buf, sizeof(buf), "%s%s%s", dir[0] ? dir : "", dir[0] ? "/" : "", suffix); |
| 380 | free(dir); |
| 381 | return strdup(buf); |
| 382 | } |
| 383 | |
| 384 | /* Rust: Cargo.toml — [package] name */ |
| 385 | static void parse_cargo_toml(const char *source, int source_len, const char *rel_path, |
no test coverage detected