Subject: [bug#78603] [PATCH v2] services: readymedia: Use relative paths to cache and log directories for home.

From: Sughosha <[email-masked]>
Date: Tue, 27 May 2025 18:58:15 +0530

This fixes readymedia configured by a different user.

* gnu/services/upnp.scm (readymedia-configuration)[cache-directory]: Update
path.
[log-directory]: Ditto.

Change-Id: I629c937973ca46bcd6e60382aa7576b9859515be
---
 gnu/services/upnp.scm | 15 ++++-----------
 1 file changed, 4 insertions(+), 11 deletions(-)

diff --git a/gnu/services/upnp.scm b/gnu/services/upnp.scm
index 8267b1e53af..a5954c83f40 100644
--- a/gnu/services/upnp.scm
+++ b/gnu/services/upnp.scm
@@ -74,19 +74,12 @@ (define-record-type* <readymedia-configuration>
         (default #f))
   (cache-directory readymedia-configuration-cache-directory
                    (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)))
   (log-directory readymedia-configuration-log-directory
                  (default (if for-home?
-                              (string-append (or (getenv "XDG_STATE_HOME")
-                                                 (string-append
-                                                  (getenv "HOME")
-                                                  "/.local/state"))
-                                             "/readymedia")
-                            %readymedia-default-log-directory)))
+                              ".local/state/readymedia"
+                              %readymedia-default-log-directory)))
   (friendly-name readymedia-configuration-friendly-name
                  (default #f))
   (media-directories readymedia-configuration-media-directories)

base-commit: c15f786f8936502249b639220997094fdbf7f1e8
-- 
2.49.0