Returns the cache directory. Writes to buf, returns buf for convenience. */
| 1871 | |
| 1872 | /* Returns the cache directory. Writes to buf, returns buf for convenience. */ |
| 1873 | static const char *cache_dir(char *buf, size_t bufsz) { |
| 1874 | const char *dir = cbm_resolve_cache_dir(); |
| 1875 | if (!dir) { |
| 1876 | dir = cbm_tmpdir(); |
| 1877 | } |
| 1878 | snprintf(buf, bufsz, "%s", dir); |
| 1879 | return buf; |
| 1880 | } |
| 1881 | |
| 1882 | /* Returns full .db path for a project: <cache_dir>/<project>.db */ |
| 1883 | static const char *project_db_path(const char *project, char *buf, size_t bufsz) { |
no test coverage detected