mirror of
git://github.com/kovidgoyal/calibre.git
synced 2025-12-21 14:56:16 +01:00
Fix #4074 (not working if home directory on AFS)
This commit is contained in:
parent
6360fdd3c5
commit
5c7db72614
1 changed files with 9 additions and 2 deletions
|
|
@ -11,8 +11,15 @@
|
|||
|
||||
from calibre.constants import iswindows
|
||||
|
||||
ADDRESS = r'\\.\pipe\CalibreGUI' if iswindows else \
|
||||
os.path.expanduser('~/.calibre-gui.socket')
|
||||
if iswindows:
|
||||
ADDRESS = r'\\.\pipe\CalibreGUI'
|
||||
else:
|
||||
from tempfile import gettempdir
|
||||
tmp = gettempdir()
|
||||
user = os.environ.get('USER', '')
|
||||
if not user:
|
||||
user = os.path.basename(os.path.expanduser('~'))
|
||||
ADDRESS = os.path.join(tmp, user+'-calibre-gui.socket')
|
||||
|
||||
class RC(Thread):
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue