mirror of
https://github.com/mawww/kakoune.git
synced 2024-11-27 12:16:22 +03:00
Support connecting to other users sessions by using <user>/<session>
This commit is contained in:
parent
2bc24d6889
commit
99b4dc9929
@ -415,7 +415,10 @@ static sockaddr_un session_addr(StringView session)
|
||||
{
|
||||
sockaddr_un addr;
|
||||
addr.sun_family = AF_UNIX;
|
||||
format_to(addr.sun_path, "/tmp/kakoune/{}/{}", getpwuid(geteuid())->pw_name, session);
|
||||
if (find(session, '/')!= session.end())
|
||||
format_to(addr.sun_path, "/tmp/kakoune/{}", session);
|
||||
else
|
||||
format_to(addr.sun_path, "/tmp/kakoune/{}/{}", getpwuid(geteuid())->pw_name, session);
|
||||
return addr;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user