Returns the cache directory. Writes to buf, returns buf for convenience. */
| 2023 | |
| 2024 | /* Returns the cache directory. Writes to buf, returns buf for convenience. */ |
| 2025 | static const char *cache_dir(char *buf, size_t bufsz) { |
| 2026 | const char *dir = cbm_resolve_cache_dir(); |
| 2027 | if (!dir) { |
| 2028 | dir = cbm_tmpdir(); |
| 2029 | } |
| 2030 | snprintf(buf, bufsz, "%s", dir); |
| 2031 | return buf; |
| 2032 | } |
| 2033 | |
| 2034 | /* Returns full .db path for a project: <cache_dir>/<project>.db */ |
| 2035 | static const char *project_db_path(const char *project, char *buf, size_t bufsz) { |
no test coverage detected