diff options
Diffstat (limited to 'Lib/lib-tk')
-rw-r--r-- | Lib/lib-tk/FileDialog.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Lib/lib-tk/FileDialog.py b/Lib/lib-tk/FileDialog.py index d3c96b8..74e9741 100644 --- a/Lib/lib-tk/FileDialog.py +++ b/Lib/lib-tk/FileDialog.py @@ -122,7 +122,11 @@ class FileDialog: self.top.grab_set() self.how = None self.master.mainloop() # Exited by self.quit(how) - if key: dialogstates[key] = self.get_filter() + if key: + directory, pattern = self.get_filter() + if self.how: + directory = os.path.dirname(self.how) + dialogstates[key] = directory, pattern self.top.destroy() return self.how |