From 38b2b0be7840d868c21093a406ab98a646212de1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Mon, 2 Dec 2019 23:24:31 +0100 Subject: Process the new location of the ICEauthority file + our internal implementation of IceAuthFileName tests whether the ICEauthority file exists in the folder specified by the XDG_RUNTIME_DIR variable + DCOP client tests whether the ICEauthority file for a specific user exists in the user's folder based on the XDG_RUNTIME_DIR variable + tdeinit uses the IceAuthFileName() function instead of building the file name MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This relates to bug 3027. Signed-off-by: Slávek Banko --- tdeinit/tdeinit.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'tdeinit/tdeinit.cpp') diff --git a/tdeinit/tdeinit.cpp b/tdeinit/tdeinit.cpp index 566a8bda0..78ed1e7c4 100644 --- a/tdeinit/tdeinit.cpp +++ b/tdeinit/tdeinit.cpp @@ -59,6 +59,7 @@ #include #include #include +#include #ifdef HAVE_SYS_PRCTL_H #include @@ -852,12 +853,7 @@ static void init_tdeinit_socket() exit(255); } } - path = getenv("ICEAUTHORITY"); - if (path.isEmpty()) - { - path = home_dir; - path += "/.ICEauthority"; - } + path = IceAuthFileName(); if (access(path.data(), R_OK|W_OK) && (errno != ENOENT)) { fprintf(stderr, "[tdeinit] Aborting. No write access to '%s'.\n", path.data()); -- cgit v1.2.1