]> git.eshelyaron.com Git - emacs.git/commitdiff
emacsclient takes more care about XDG_RUNTIME_DIR
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 9 Dec 2021 17:03:10 +0000 (09:03 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 9 Dec 2021 20:03:37 +0000 (12:03 -0800)
* lib-src/emacsclient.c (set_local_socket): Revert to the Emacs 27
behavior of not trying TMPDIR if XDG_RUNTIME_DIR is set.
This is one of the suggestions made by Jim Porter and
independently by Ulrich Mueller in Bug#51327.

lib-src/emacsclient.c

index cff3cec2a79f26d9b9211083cc6515c33fd4c66b..d11fd88c45e34a6193597c151b1a40332ce62c6c 100644 (file)
@@ -1456,7 +1456,6 @@ set_local_socket (char const *server_name)
   else
     {
       /* socket_name is a file name component.  */
-      sock_status = ENOENT;
       char const *xdg_runtime_dir = egetenv ("XDG_RUNTIME_DIR");
       if (xdg_runtime_dir)
        {
@@ -1466,7 +1465,7 @@ set_local_socket (char const *server_name)
                         ? connect_socket (AT_FDCWD, sockname, s, 0)
                         : ENAMETOOLONG);
        }
-      if (sock_status == ENOENT)
+      else
        {
          char const *tmpdir = egetenv ("TMPDIR");
          if (tmpdir)