GNU bug report logs -
#78603
[PATCH] services: readymedia: Respect SUDO_HOME if configuring for home.
Previous Next
Full log
Message #23 received at 78603 <at> debbugs.gnu.org (full text, mbox):
Hi,
Sughosha <sughosha <at> disroot.org> writes:
> This fixes readymedia configured by a different user.
>
> * gnu/services/upnp.scm (readymedia-configuration)[cache-directory]: Update
> path.
> [log-directory]: Ditto.
>
> Change-Id: I629c937973ca46bcd6e60382aa7576b9859515be
[...]
> (default (if for-home?
> - (string-append (or (getenv "XDG_CACHE_HOME")
> - (string-append
> - (getenv "HOME") "/.cache"))
> - "/readymedia")
> - %readymedia-default-cache-directory)))
> + ".cache/readymedia"
> + %readymedia-default-cache-directory)))
A better solution, to avoid brittleness associated with relative
file names, is to turn ‘cache-directory’ into a gexp that would ‘getenv’
as above and/or ‘getpw’ to determine the cache directory name.
The (shepherd support) module provides ‘%user-log-dir’ etc., but
unfortunately it lacks ‘%user-cache-dir’.
HTH,
Ludo’.
This bug report was last modified 35 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.