aboutsummaryrefslogtreecommitdiffstats
path: root/lib-src
diff options
context:
space:
mode:
Diffstat (limited to 'lib-src')
-rw-r--r--lib-src/emacsclient.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c
index 645ff04c6d4..204064f1871 100644
--- a/lib-src/emacsclient.c
+++ b/lib-src/emacsclient.c
@@ -924,21 +924,22 @@ open_config (char const *home, char const *xdg, char const *config_file)
924 char *configname = xmalloc (max (xdgsubdirsize, homesubdirsizemax) 924 char *configname = xmalloc (max (xdgsubdirsize, homesubdirsizemax)
925 + strlen (config_file)); 925 + strlen (config_file));
926 FILE *config; 926 FILE *config;
927 if (xdg || home) 927
928 if (home)
928 { 929 {
929 strcpy ((xdg 930 strcpy (stpcpy (stpcpy (configname, home), "/.emacs.d/server/"),
930 ? stpcpy (stpcpy (configname, xdg), "/emacs/server/") 931 config_file);
931 : stpcpy (stpcpy (configname, home), "/.config/emacs/server/")),
932 config_file);
933 config = fopen (configname, "rb"); 932 config = fopen (configname, "rb");
934 } 933 }
935 else 934 else
936 config = NULL; 935 config = NULL;
937 936
938 if (! config && home) 937 if (! config && (xdg || home))
939 { 938 {
940 strcpy (stpcpy (stpcpy (configname, home), "/.emacs.d/server/"), 939 strcpy ((xdg
941 config_file); 940 ? stpcpy (stpcpy (configname, xdg), "/emacs/server/")
941 : stpcpy (stpcpy (configname, home), "/.config/emacs/server/")),
942 config_file);
942 config = fopen (configname, "rb"); 943 config = fopen (configname, "rb");
943 } 944 }
944 945