[babl] fish-cache: fix cache path on linux
- From: Øyvind Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [babl] fish-cache: fix cache path on linux
- Date: Sun, 12 Mar 2017 19:03:25 +0000 (UTC)
commit 02b2397fe72ccaa155b5ff8f240a18ea5679b477
Author: Victor Ananjevsky <ananasik gmail com>
Date: Sun Mar 12 20:01:38 2017 +0100
fish-cache: fix cache path on linux
make babl on linux honor $XDG_CACHE_HOME variable, falling back to using
$HOME/.cache
babl/babl-cache.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/babl/babl-cache.c b/babl/babl-cache.c
index 5f7b716..f498115 100644
--- a/babl/babl-cache.c
+++ b/babl/babl-cache.c
@@ -78,7 +78,9 @@ static const char *fish_cache_path (void)
strncpy (path, FALLBACK_CACHE_PATH, 4096);
#ifndef _WIN32
- if (getenv ("HOME"))
+ if (getenv ("XDG_CACHE_HOME"))
+ sprintf (path, "%s/babl/babl-fishes", getenv("XDG_CACHE_HOME"));
+ else if (getenv ("HOME"))
sprintf (path, "%s/.cache/babl/babl-fishes", getenv("HOME"));
#else
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]