summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarsten Haitzler <raster@rasterman.com>2012-12-29 03:39:20 +0000
committerCarsten Haitzler <raster@rasterman.com>2012-12-29 03:39:20 +0000
commit717f0823e01fc60914ef587ff9fb47dfb0f95db6 (patch)
tree1178713b5288fc813d85196ab281b32614faac79 /src
parent2608f68571b277967b2e27d6136c95f03befd183 (diff)
small change - use xdg runtime dir if available instead of home. nicer
in xdg worlds. still falls back tho. SVN revision: 81858
Diffstat (limited to 'src')
-rw-r--r--src/lib/ecore_con/ecore_con_local.c28
1 files changed, 18 insertions, 10 deletions
diff --git a/src/lib/ecore_con/ecore_con_local.c b/src/lib/ecore_con/ecore_con_local.c
index a793bf4541..647d9d502d 100644
--- a/src/lib/ecore_con/ecore_con_local.c
+++ b/src/lib/ecore_con/ecore_con_local.c
@@ -75,12 +75,16 @@ ecore_con_local_connect(Ecore_Con_Server *svr,
75 75
76 if ((svr->type & ECORE_CON_TYPE) == ECORE_CON_LOCAL_USER) 76 if ((svr->type & ECORE_CON_TYPE) == ECORE_CON_LOCAL_USER)
77 { 77 {
78 homedir = getenv("HOME"); 78 homedir = getenv("XDG_RUNTIME_DIR");
79 if (!homedir) 79 if (!homedir)
80 homedir = getenv("TMP"); 80 {
81 81 homedir = getenv("HOME");
82 if (!homedir) 82 if (!homedir)
83 homedir = "/tmp"; 83 {
84 homedir = getenv("TMP");
85 if (!homedir) homedir = "/tmp";
86 }
87 }
84 88
85 snprintf(buf, sizeof(buf), "%s/.ecore/%s/%i", homedir, svr->name, 89 snprintf(buf, sizeof(buf), "%s/.ecore/%s/%i", homedir, svr->name,
86 svr->port); 90 svr->port);
@@ -196,12 +200,16 @@ ecore_con_local_listen(
196 200
197 if ((svr->type & ECORE_CON_TYPE) == ECORE_CON_LOCAL_USER) 201 if ((svr->type & ECORE_CON_TYPE) == ECORE_CON_LOCAL_USER)
198 { 202 {
199 homedir = getenv("HOME"); 203 homedir = getenv("XDG_RUNTIME_DIR");
200 if (!homedir) 204 if (!homedir)
201 homedir = getenv("TMP"); 205 {
202 206 homedir = getenv("HOME");
203 if (!homedir) 207 if (!homedir)
204 homedir = "/tmp"; 208 {
209 homedir = getenv("TMP");
210 if (!homedir) homedir = "/tmp";
211 }
212 }
205 213
206 mask = S_IRUSR | S_IWUSR | S_IXUSR; 214 mask = S_IRUSR | S_IWUSR | S_IXUSR;
207 snprintf(buf, sizeof(buf), "%s/.ecore", homedir); 215 snprintf(buf, sizeof(buf), "%s/.ecore", homedir);