| 358 | } |
| 359 | |
| 360 | string path_cache_get(const string &sub) |
| 361 | { |
| 362 | #if defined(__linux__) || defined(__APPLE__) |
| 363 | if (cached_xdg_cache_path.empty()) { |
| 364 | cached_xdg_cache_path = path_xdg_cache_get(); |
| 365 | } |
| 366 | const string result = path_join(cached_xdg_cache_path, "cycles"); |
| 367 | return path_join(result, sub); |
| 368 | #else |
| 369 | /* TODO(sergey): What that should be on Windows? */ |
| 370 | return path_user_get(path_join("cache", sub)); |
| 371 | #endif |
| 372 | } |
| 373 | |
| 374 | #if defined(__linux__) || defined(__APPLE__) |
| 375 | string path_xdg_home_get(const string &sub = ""); |
no test coverage detected