| 379 | } |
| 380 | |
| 381 | const char *cbm_app_local_dir(void) { |
| 382 | #ifdef _WIN32 |
| 383 | static char buf[CBM_SZ_1K]; |
| 384 | char tmp[CBM_SZ_256] = ""; |
| 385 | cbm_safe_getenv("LOCALAPPDATA", tmp, sizeof(tmp), NULL); |
| 386 | if (tmp[0]) { |
| 387 | snprintf(buf, sizeof(buf), "%s", tmp); |
| 388 | cbm_normalize_path_sep(buf); |
| 389 | return buf; |
| 390 | } |
| 391 | const char *home = cbm_get_home_dir(); |
| 392 | if (home) { |
| 393 | snprintf(buf, sizeof(buf), "%s/AppData/Local", home); |
| 394 | return buf; |
| 395 | } |
| 396 | return NULL; |
| 397 | #else |
| 398 | return cbm_app_config_dir(); |
| 399 | #endif |
| 400 | } |
| 401 | |
| 402 | /* ── Cache directory ────────────────────────── */ |
| 403 |
no test coverage detected