OBS-URL: https://build.opensuse.org/package/show/utilities/tmux?expand=0&rev=47
44 lines
1.2 KiB
Diff
44 lines
1.2 KiB
Diff
diff --git a/tmux.c b/tmux.c
|
|
index 8d390203..6094751f 100644
|
|
--- a/tmux.c
|
|
+++ b/tmux.c
|
|
@@ -198,16 +198,16 @@ make_label(const char *label, char **cause)
|
|
|
|
expand_paths(TMUX_SOCK, &paths, &n, 0);
|
|
if (n == 0) {
|
|
- xasprintf(cause, "no suitable socket path");
|
|
- return (NULL);
|
|
+ /* SUSE specific hack - remain compatible with previously used socket path */
|
|
+ xasprintf(&base, "/run/tmux/%ld", (long)uid);
|
|
+ } else {
|
|
+ path = paths[0]; /* can only have one socket! */
|
|
+ for (i = 1; i < n; i++)
|
|
+ free(paths[i]);
|
|
+ free(paths);
|
|
+ xasprintf(&base, "%s/tmux-%ld", path, (long)uid);
|
|
+ free(path);
|
|
}
|
|
- path = paths[0]; /* can only have one socket! */
|
|
- for (i = 1; i < n; i++)
|
|
- free(paths[i]);
|
|
- free(paths);
|
|
-
|
|
- xasprintf(&base, "%s/tmux-%ld", path, (long)uid);
|
|
- free(path);
|
|
if (mkdir(base, S_IRWXU) != 0 && errno != EEXIST) {
|
|
xasprintf(cause, "couldn't create directory %s (%s)", base,
|
|
strerror(errno));
|
|
diff --git a/tmux.h b/tmux.h
|
|
index b2f10ca7..c7b2b5eb 100644
|
|
--- a/tmux.h
|
|
+++ b/tmux.h
|
|
@@ -84,7 +84,7 @@ struct winlink;
|
|
#define TMUX_CONF "/etc/tmux.conf:~/.tmux.conf"
|
|
#endif
|
|
#ifndef TMUX_SOCK
|
|
-#define TMUX_SOCK "$TMUX_TMPDIR:" _PATH_TMP
|
|
+#define TMUX_SOCK "$TMUX_TMPDIR:"
|
|
#endif
|
|
#ifndef TMUX_SOCK_PERM
|
|
#define TMUX_SOCK_PERM (7 /* o+rwx */)
|