Prefer /run/user instead of /var/run/user
This commit is contained in:
@@ -39,10 +39,14 @@ _sxmo_find_runtime_dir() {
|
|||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -d "/var/run/user/$(id -u)" ]; then
|
# Try something existing
|
||||||
printf "/var/run/user/%s" "$(id -u)"
|
for root in /run /var/run; do
|
||||||
return
|
path="$root/user/$(id -u)"
|
||||||
fi
|
if [ -d "$path" ] && [ -w "$path" ]; then
|
||||||
|
printf %s "$path"
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
# Fallback to a shared memory location
|
# Fallback to a shared memory location
|
||||||
printf "/dev/shm/user/%s" "$(id -u)"
|
printf "/dev/shm/user/%s" "$(id -u)"
|
||||||
|
Reference in New Issue
Block a user