| 542 | |
| 543 | #ifndef _WIN32 |
| 544 | static char *toml_parent_directory(const char *path) { |
| 545 | const char *separator = strrchr(path, '/'); |
| 546 | if (!separator) { |
| 547 | return cbm_strdup("."); |
| 548 | } |
| 549 | if (separator == path) { |
| 550 | return cbm_strdup("/"); |
| 551 | } |
| 552 | return cbm_strndup(path, (size_t)(separator - path)); |
| 553 | } |
| 554 | #endif |
| 555 | |
| 556 | static int toml_snapshot_matches_path(const char *path, const char *old_data, size_t old_len, |
no test coverage detected