aboutsummaryrefslogtreecommitdiff
path: root/src/librc
diff options
context:
space:
mode:
authorAnna (navi) Figueiredo Gomes <navi@vlhl.dev>2023-10-19 13:15:17 +0200
committerAnna (navi) Figueiredo Gomes <navi@vlhl.dev>2023-10-19 13:15:17 +0200
commitad6fd5c8c6c95bcefaaf8abb31a39b4b88587982 (patch)
treed08e0bd771ed90f116db90d830ab2b5b911ff72f /src/librc
parenta695e4d4f61afb91701efc6eaf08ca44eb230be9 (diff)
testing RC_RUNTIME_DIR
Signed-off-by: Anna (navi) Figueiredo Gomes <navi@vlhl.dev>
Diffstat (limited to 'src/librc')
-rw-r--r--src/librc/librc.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/librc/librc.c b/src/librc/librc.c
index 9d9e7461..4768df33 100644
--- a/src/librc/librc.c
+++ b/src/librc/librc.c
@@ -1472,10 +1472,12 @@ rc_svcdir(void)
char *env;
if (rc_is_user()) {
- if ((env = getenv("XDG_RUNTIME_DIR"))) {
+ if ((env = getenv("RC_RUNTIME_DIR"))) {
+ xasprintf(&path, "%s/%s", env, RC_USER_CONF_FOLDER);
+ } else if ((env = getenv("XDG_RUNTIME_DIR"))) {
xasprintf(&path, "%s/%s", env, RC_USER_CONF_FOLDER);
} else {
- eerrorx("XDG_RUNTIME_DIR not set in user mode");
+ eerrorx("neither RC_RUNTIME_DIR nor XDG_RUNTIME_DIR set in user mode");
}
} else {
#endif