Convert path objects to strings in askdirectory. Fixes #852314.

Backported to 2.3.
This commit is contained in:
Martin v. Löwis 2003-12-01 21:04:22 +00:00
parent 3375fc5a3b
commit 85f48e3b9b
1 changed files with 6 additions and 0 deletions

View File

@ -105,6 +105,12 @@ class Directory(Dialog):
def _fixresult(self, widget, result):
if result:
# convert Tcl path objects to strings
try:
result = result.string
except AttributeError:
# it already is a string
pass
# keep directory until next time
self.options["initialdir"] = result
self.directory = result # compatibility