forked from enlightenment/enlightenment
e: Create a temp XDG_RUNTIME_DIR if not set
Using /tmp as XDG_RUNTIME_DIR is pointless if we want it to be mode 0700
This commit is contained in:
parent
6f2ce10eb1
commit
dd27589470
|
@ -151,7 +151,15 @@ _xdg_data_dirs_augment(void)
|
|||
}
|
||||
|
||||
if (!getenv("XDG_RUNTIME_DIR"))
|
||||
e_util_env_set("XDG_RUNTIME_DIR", "/tmp");
|
||||
{
|
||||
char buf[PATH_MAX];
|
||||
const char *dir;
|
||||
|
||||
snprintf(buf, sizeof(buf), "/tmp/xdg_runtime_XXXXXX");
|
||||
dir = mkdtemp(buf);
|
||||
if (!dir) dir = "/tmp";
|
||||
e_util_env_set("XDG_RUNTIME_DIR", dir);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Reference in New Issue