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
@ -80,6 +80,9 @@ class FileDialog(QObject):
|
||||
if os.path.exists(prev):
|
||||
if os.path.isfile(prev):
|
||||
prev = os.path.dirname(prev)
|
||||
else:
|
||||
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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user