mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-06-23 15:30:45 -04:00
Fix #1298071 [[Edit book]: Crash exporting image](https://bugs.launchpad.net/calibre/+bug/1298071)
This commit is contained in:
parent
5fbd225f25
commit
d1be4d94e5
@ -629,12 +629,12 @@ class FileDialog(QObject):
|
||||
if combine_file_and_saved_dir:
|
||||
bn = os.path.basename(default_dir)
|
||||
prev = dynamic.get(self.dialog_name,
|
||||
os.path.expanduser('~'))
|
||||
os.path.expanduser(u'~'))
|
||||
if os.path.exists(prev):
|
||||
if os.path.isfile(prev):
|
||||
prev = os.path.dirname(prev)
|
||||
else:
|
||||
prev = os.path.expanduser('~')
|
||||
prev = os.path.expanduser(u'~')
|
||||
initial_dir = os.path.join(prev, bn)
|
||||
elif no_save_dir:
|
||||
initial_dir = os.path.expanduser(default_dir)
|
||||
|
Loading…
x
Reference in New Issue
Block a user