From 21f57f211a1ec5b40f92d040ac9d346cf9dd6552 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Fri, 3 Feb 2023 10:04:27 -0700 Subject: emacsclient wrapper: don't try to call ls on non-existent directory --- bin/emacsclient | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bin/emacsclient') 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 -- cgit v1.2.3