mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Use dir for saved selected file if file doesnt exist
This commit is contained in:
parent
1a7a4544f5
commit
98a6234414
@ -81,7 +81,10 @@ class FileDialog(QObject):
|
||||
if os.path.isfile(prev):
|
||||
prev = os.path.dirname(prev)
|
||||
else:
|
||||
prev = os.path.expanduser('~')
|
||||
if os.path.exists(os.path.dirname(prev)):
|
||||
prev = os.path.dirname(prev)
|
||||
else:
|
||||
prev = os.path.expanduser('~')
|
||||
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