mirror of
https://github.com/kovidgoyal/calibre.git
synced 2026-03-11 04:13:41 -04:00
Use uid rather than user name which can be arbitrary length in socket path
This commit is contained in:
parent
50d71bda18
commit
e316b304d6
@ -45,7 +45,7 @@ def socket_address(which):
|
||||
ans = '\0' + sock_name
|
||||
else:
|
||||
# tempdir already contains calibre in its path
|
||||
sock_name = '{}-{}.sock'.format(ascii_filename(user).replace(' ', '_'), which)
|
||||
sock_name = f'{os.getuid()}-{which}.sock'
|
||||
from tempfile import gettempdir
|
||||
tmp = force_unicode(gettempdir(), filesystem_encoding)
|
||||
ans = os.path.join(tmp, sock_name)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user