summaryrefslogtreecommitdiff
path: root/bin/emacsclient
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2023-02-03 10:04:27 -0700
committerSean Whitton <spwhitton@spwhitton.name>2023-02-03 10:06:09 -0700
commit21f57f211a1ec5b40f92d040ac9d346cf9dd6552 (patch)
tree2ac8208256c5b4992221a2e23b94e6ea2a2af64a /bin/emacsclient
parentb5273895f001a4d7e96c0e78d2048ed4b3b1e9b3 (diff)
downloaddotfiles-21f57f211a1ec5b40f92d040ac9d346cf9dd6552.tar.gz
emacsclient wrapper: don't try to call ls on non-existent directory
Diffstat (limited to 'bin/emacsclient')
-rwxr-xr-xbin/emacsclient4
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/emacsclient b/bin/emacsclient
index ff6b071e..f140df52 100755
--- a/bin/emacsclient
+++ b/bin/emacsclient
@@ -208,8 +208,8 @@ if [ -n "$XDG_RUNTIME_DIR" -a -z "$listener" ]; then
tmpdir_d="${TMPDIR:-/tmp}/emacs${euid:=$(id -u)}/"
tmpdir_s="$tmpdir_d${daemon_name:-server}"
if [ -d "$tmpdir_d" -a -S "$tmpdir_s" \
- -a -O "$tmpdir_d" -a -O "$tmpdir_s" \
- -a "$(ls -ld "$tmpdir_d" | awk '{ print $1 }')" = drwx------ \
+ -a -O "$tmpdir_d" -a -O "$tmpdir_s" ] \
+ && [ "$(ls -ld "$tmpdir_d" | awk '{ print $1 }')" = drwx------ \
-a -n "${tmpdir_listener:=$(get_listener "$tmpdir_s")}" ]; then
ln -s "$tmpdir_s" "$socket"
listener=$tmpdir_listener