mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
If calibre is atrted from a directory that does not exist, automatically use the home directory as the working directory, instead of crashing
This commit is contained in:
parent
d30bbdd8aa
commit
466f73159e
@ -10,7 +10,10 @@ from math import floor
|
||||
from functools import partial
|
||||
|
||||
warnings.simplefilter('ignore', DeprecationWarning)
|
||||
|
||||
try:
|
||||
os.getcwdu()
|
||||
except:
|
||||
os.chdir(os.path.expanduser('~'))
|
||||
|
||||
from calibre.constants import (iswindows, isosx, islinux, isfrozen,
|
||||
isbsd, preferred_encoding, __appname__, __version__, __author__,
|
||||
|
Loading…
x
Reference in New Issue
Block a user