th_mktempdir hands back one static buffer, so copy at once — and in canonical * form, because the policy compares resolved spellings and /tmp is a link on * macOS. */
| 505 | * form, because the policy compares resolved spellings and /tmp is a link on |
| 506 | * macOS. */ |
| 507 | static bool ws_tempdir_canonical(const char *prefix, char *out, size_t out_sz) { |
| 508 | char *created = th_mktempdir(prefix); |
| 509 | return created && cbm_canonical_path(created, out, out_sz) == 1; |
| 510 | } |
| 511 | |
| 512 | static bool ws_join(char *out, size_t out_sz, const char *a, const char *b) { |
| 513 | int n = snprintf(out, out_sz, "%s/%s", a, b); |
no test coverage detected