mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 18:54:09 -04:00
Fix #1699435 [Invisible Calibre permanently hangs in memory or instant exit after start it](https://bugs.launchpad.net/calibre/+bug/1699435)
This commit is contained in:
parent
94bf274222
commit
fbaccfb5fa
@ -760,7 +760,10 @@ class LibraryPage(QWizardPage, LibraryUI):
|
||||
self.default_library_name = None
|
||||
if not lp:
|
||||
fname = _('Calibre Library')
|
||||
base = os.path.expanduser(u'~')
|
||||
try:
|
||||
base = os.path.expanduser(u'~')
|
||||
except ValueError:
|
||||
base = QDir.homePath().replace('/', os.sep)
|
||||
if iswindows:
|
||||
try:
|
||||
x = winutil.special_folder_path(winutil.CSIDL_PERSONAL)
|
||||
@ -776,7 +779,10 @@ class LibraryPage(QWizardPage, LibraryUI):
|
||||
os.makedirs(lp)
|
||||
except:
|
||||
traceback.print_exc()
|
||||
lp = os.path.expanduser(u'~')
|
||||
try:
|
||||
lp = os.path.expanduser(u'~')
|
||||
except ValueError:
|
||||
lp = QDir.homePath().replace('/', os.sep)
|
||||
self.location.setText(lp)
|
||||
# Hide the library location settings if we are a portable install
|
||||
for x in ('location', 'button_change', 'libloc_label1',
|
||||
|
Loading…
x
Reference in New Issue
Block a user