mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -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
|
self.default_library_name = None
|
||||||
if not lp:
|
if not lp:
|
||||||
fname = _('Calibre Library')
|
fname = _('Calibre Library')
|
||||||
base = os.path.expanduser(u'~')
|
try:
|
||||||
|
base = os.path.expanduser(u'~')
|
||||||
|
except ValueError:
|
||||||
|
base = QDir.homePath().replace('/', os.sep)
|
||||||
if iswindows:
|
if iswindows:
|
||||||
try:
|
try:
|
||||||
x = winutil.special_folder_path(winutil.CSIDL_PERSONAL)
|
x = winutil.special_folder_path(winutil.CSIDL_PERSONAL)
|
||||||
@ -776,7 +779,10 @@ class LibraryPage(QWizardPage, LibraryUI):
|
|||||||
os.makedirs(lp)
|
os.makedirs(lp)
|
||||||
except:
|
except:
|
||||||
traceback.print_exc()
|
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)
|
self.location.setText(lp)
|
||||||
# Hide the library location settings if we are a portable install
|
# Hide the library location settings if we are a portable install
|
||||||
for x in ('location', 'button_change', 'libloc_label1',
|
for x in ('location', 'button_change', 'libloc_label1',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user