Returns the cache directory. Writes to buf, returns buf for convenience. */
| 2240 | |
| 2241 | /* Returns the cache directory. Writes to buf, returns buf for convenience. */ |
| 2242 | static const char *cache_dir(char *buf, size_t bufsz) { |
| 2243 | const char *dir = cbm_resolve_cache_dir(); |
| 2244 | if (!dir) { |
| 2245 | dir = cbm_tmpdir(); |
| 2246 | } |
| 2247 | snprintf(buf, bufsz, "%s", dir); |
| 2248 | return buf; |
| 2249 | } |
| 2250 | |
| 2251 | /* Returns full .db path for a project: <cache_dir>/<project>.db */ |
| 2252 | static const char *project_db_path(const char *project, char *buf, size_t bufsz) { |
no test coverage detected