Ephoto: USE XDG_CACHE_HOME/ephoto/thumbnails if XDG_CACHE_HOME exists, otherwise use $HOME/.cache/ephoto/thumbnails

This commit is contained in:
Stephen okra Houston 2016-08-29 14:14:40 -05:00
parent b05d3b1dba
commit b4b522e49a
1 changed files with 4 additions and 1 deletions

View File

@ -88,7 +88,10 @@ main(int argc,
ecore_file_init();
ecore_ipc_init();
snprintf(_thumbdir, PATH_MAX, "%s/.cache/ephoto/thumbnails", getenv("HOME"));
if (getenv("XDG_CACHE_HOME"))
snprintf(_thumbdir, PATH_MAX, "%s/ephoto/thumbnails", getenv("XDG_CACHE_HOME"));
else
snprintf(_thumbdir, PATH_MAX, "%s/.cache/ephoto/thumbnails", getenv("HOME"));
ecore_file_mkpath(_thumbdir);
if (_e_ipc_init()) ecore_main_loop_begin();