Fix #8398 (Bug in FileDialog class)

This commit is contained in:
Kovid Goyal 2011-01-15 23:08:00 -07:00
parent 47f4df49b6
commit 5d9f9325a2

View File

@ -505,7 +505,7 @@ class FileDialog(QObject):
self.selected_files = []
if mode == QFileDialog.AnyFile:
f = unicode(QFileDialog.getSaveFileName(parent, title, initial_dir, ftext, ""))
if f and os.path.exists(f):
if f:
self.selected_files.append(f)
elif mode == QFileDialog.ExistingFile:
f = unicode(QFileDialog.getOpenFileName(parent, title, initial_dir, ftext, ""))