pub fn default_socket_path() -> PathBufExpand description
Default UDS socket path. Resolves at call time so a daemon
started with XDG_RUNTIME_DIR=/foo and a client started later
without the var both look in the same place (the XDG fallback).
Every arm is ABSOLUTE or it is skipped. Both env arms used to take their
variable verbatim, and only the literal /tmp/tear.sock third arm was safe.
That defeats the guarantee the paragraph above is making: with
XDG_RUNTIME_DIR="" the result is the bare relative tear.sock, so “the
same place” becomes the process’s cwd and a daemon started from $HOME
and a client started from a repo bind and dial different sockets. Neither
errors — they simply never meet.