mirror of
				https://github.com/kovidgoyal/calibre.git
				synced 2025-11-04 03:27:00 -05:00 
			
		
		
		
	Fix #4074 (not working if home directory on AFS)
This commit is contained in:
		
							parent
							
								
									6360fdd3c5
								
							
						
					
					
						commit
						5c7db72614
					
				@ -11,8 +11,15 @@ from threading import Thread
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
from calibre.constants import iswindows
 | 
					from calibre.constants import iswindows
 | 
				
			||||||
 | 
					
 | 
				
			||||||
ADDRESS = r'\\.\pipe\CalibreGUI' if iswindows else \
 | 
					if iswindows:
 | 
				
			||||||
    os.path.expanduser('~/.calibre-gui.socket')
 | 
					    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):
 | 
					class RC(Thread):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user