diff options
| author | Paul Eggert | 2021-12-09 09:03:10 -0800 |
|---|---|---|
| committer | Paul Eggert | 2021-12-09 12:03:37 -0800 |
| commit | dda63370669dba6dfda53dec62de8b1c1c275b2d (patch) | |
| tree | 0d45a0e21afa73bf925d9b8d9e896536b4586839 /lib-src | |
| parent | 26fb4168b884eeb910580c42e87efb73399019c9 (diff) | |
| download | emacs-dda63370669dba6dfda53dec62de8b1c1c275b2d.tar.gz emacs-dda63370669dba6dfda53dec62de8b1c1c275b2d.zip | |
emacsclient takes more care about XDG_RUNTIME_DIR
* 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.
Diffstat (limited to 'lib-src')
| -rw-r--r-- | lib-src/emacsclient.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c index cff3cec2a79..d11fd88c45e 100644 --- a/lib-src/emacsclient.c +++ b/lib-src/emacsclient.c | |||
| @@ -1456,7 +1456,6 @@ set_local_socket (char const *server_name) | |||
| 1456 | else | 1456 | else |
| 1457 | { | 1457 | { |
| 1458 | /* socket_name is a file name component. */ | 1458 | /* socket_name is a file name component. */ |
| 1459 | sock_status = ENOENT; | ||
| 1460 | char const *xdg_runtime_dir = egetenv ("XDG_RUNTIME_DIR"); | 1459 | char const *xdg_runtime_dir = egetenv ("XDG_RUNTIME_DIR"); |
| 1461 | if (xdg_runtime_dir) | 1460 | if (xdg_runtime_dir) |
| 1462 | { | 1461 | { |
| @@ -1466,7 +1465,7 @@ set_local_socket (char const *server_name) | |||
| 1466 | ? connect_socket (AT_FDCWD, sockname, s, 0) | 1465 | ? connect_socket (AT_FDCWD, sockname, s, 0) |
| 1467 | : ENAMETOOLONG); | 1466 | : ENAMETOOLONG); |
| 1468 | } | 1467 | } |
| 1469 | if (sock_status == ENOENT) | 1468 | else |
| 1470 | { | 1469 | { |
| 1471 | char const *tmpdir = egetenv ("TMPDIR"); | 1470 | char const *tmpdir = egetenv ("TMPDIR"); |
| 1472 | if (tmpdir) | 1471 | if (tmpdir) |