elextr requested changes on this pull request.


> @@ -439,20 +441,35 @@ static gint socket_fd_open_unix(const gchar *path)
                return -1;
        }
 
-       /* fix for #1888561:
-        * in case the configuration directory is located on a network file 
system or any other
-        * file system which doesn't support sockets, we just link the socket 
there and create the
-        * real socket in the system's tmp directory assuming it supports 
sockets */
-       real_path = g_strdup_printf("%s%cgeany_socket.%08x",
-               g_get_tmp_dir(), G_DIR_SEPARATOR, g_random_int());
+       /* Try to place the socket in XDG_RUNTIME_DIR, according to XDG Base
+        * Directory Specification, see
+        * https://specifications.freedesktop.org/basedir-spec/latest */
+       real_dir = g_build_filename(g_get_user_runtime_dir(), "geany", NULL);
+       if (g_mkdir_with_parents(real_dir, 0755) == 0)
+       {
+               basename = g_path_get_basename(path);
+               real_path = g_build_filename(real_dir, basename, NULL);
+       }

As I said in comment, this tries to create the same socket if the user runs 
geany with two different configs.

(geany:20745): Geany-WARNING **: 12:28:53.641: Failed to bind IPC socket 
(/run/user/1000/geany/geany_socket_fred9__0): 98: Address already in use



-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/2222#pullrequestreview-263989941

Reply via email to