Try /tmp for .xdg-app-root if /run/user not available

tingping/wmclass
Alexander Larsson 2015-02-06 11:58:57 +01:00
parent 61ababa60e
commit 3afe98d614
1 changed files with 6 additions and 1 deletions

View File

@ -1341,7 +1341,12 @@ main (int argc,
newroot = strdup_printf ("/run/user/%d/.xdg-app-root", getuid());
if (mkdir (newroot, 0755) && errno != EEXIST)
die_with_error ("Creating xdg-app-root failed");
{
free (newroot);
newroot = strdup_printf ("/tmp/.xdg-app-root", getuid());
if (mkdir (newroot, 0755) && errno != EEXIST)
die_with_error ("Creating xdg-app-root failed");
}
/* Now switch back to the root user */
if (seteuid (saved_euid))