| 520 | |
| 521 | #ifndef _WIN32 |
| 522 | static char *toml_parent_directory(const char *path) { |
| 523 | const char *separator = strrchr(path, '/'); |
| 524 | if (!separator) { |
| 525 | return cbm_strdup("."); |
| 526 | } |
| 527 | if (separator == path) { |
| 528 | return cbm_strdup("/"); |
| 529 | } |
| 530 | return cbm_strndup(path, (size_t)(separator - path)); |
| 531 | } |
| 532 | #endif |
| 533 | |
| 534 | static int toml_snapshot_matches_path(const char *path, const char *old_data, size_t old_len, |
no test coverage detected