mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00
don't set current dir in file selector if it doesn't exist
some users were reporting hangs
This commit is contained in:
parent
08829da011
commit
781e592339
1 changed files with 2 additions and 1 deletions
|
@ -241,7 +241,8 @@ def getFile(parent, title, cb, filter="*.*", dir=None, key=None):
|
|||
if isMac:
|
||||
d.setOptions(QFileDialog.DontUseNativeDialog)
|
||||
d.setFileMode(QFileDialog.ExistingFile)
|
||||
d.setDirectory(dir)
|
||||
if os.path.exists(dir):
|
||||
d.setDirectory(dir)
|
||||
d.setWindowTitle(title)
|
||||
d.setNameFilter(filter)
|
||||
ret = []
|
||||
|
|
Loading…
Reference in a new issue