Browse Source

ksmserver: Use the IceAuthFileName() function

instead of building the file name.

This relates to bug 3027.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
pull/103/head
Slávek Banko 9 months ago
parent
commit
ed93cf0e08
Signed by: SlavekB GPG Key ID: 608F5293A04BE668
1 changed files with 3 additions and 7 deletions
  1. +3
    -7
      ksmserver/main.cpp

+ 3
- 7
ksmserver/main.cpp View File

@@ -99,14 +99,10 @@ void sanity_check( int argc, char* argv[] )
}
if (msg.isEmpty())
{
path = getenv("ICEAUTHORITY");
path = IceAuthFileName();
if (path.isEmpty())
{
path = getenv("HOME");
path += "/.ICEauthority";
}

if (access(path.data(), W_OK) && (errno != ENOENT))
msg = "Unable to determine path for ICEauthority file.";
else if (access(path.data(), W_OK) && (errno != ENOENT))
msg = "No write access to '%s'.";
else if (access(path.data(), R_OK) && (errno != ENOENT))
msg = "No read access to '%s'.";


Loading…
Cancel
Save