diff options
author | nijtmans <nijtmans> | 2010-05-17 22:16:52 (GMT) |
---|---|---|
committer | nijtmans <nijtmans> | 2010-05-17 22:16:52 (GMT) |
commit | 154d66ee2ba284c660ae8f0430757d18d0c77a02 (patch) | |
tree | d24860813a5c31c175c1eec191e6d6645f1ab4a9 | |
parent | f74e5ef77536fc80f0f0a89f6cd676e9bc6c5796 (diff) | |
download | tk-154d66ee2ba284c660ae8f0430757d18d0c77a02.zip tk-154d66ee2ba284c660ae8f0430757d18d0c77a02.tar.gz tk-154d66ee2ba284c660ae8f0430757d18d0c77a02.tar.bz2 |
Fix [Bug #3002230]: tk_chooseDirectory returns garbage on cancel
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | win/tkWinDialog.c | 9 |
2 files changed, 13 insertions, 1 deletions
@@ -1,3 +1,8 @@ +2010-05-17 Jan Nijtmans <nijtmans@users.sf.net> + + * win/tkWinDialog.c: Fix [Bug #3002230]: tk_chooseDirectory returns + garbage on cancel + 2010-05-17 Joe English <jenglish@users.sourceforge.net> * generic/tkBind.c: Revert [Patch #2999920], as it entails an diff --git a/win/tkWinDialog.c b/win/tkWinDialog.c index 8ac95bf..592559d 100644 --- a/win/tkWinDialog.c +++ b/win/tkWinDialog.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkWinDialog.c,v 1.74 2010/05/17 08:44:00 nijtmans Exp $ + * RCS: @(#) $Id: tkWinDialog.c,v 1.75 2010/05/17 22:16:52 nijtmans Exp $ * */ @@ -2037,6 +2037,13 @@ Tk_ChooseDirectoryObjCmd( pidl = SHBrowseForFolder(&bInfo); /* + * This is a fix for Windows 2000, which seems to modify the folder name + * buffer even when the dialog is canceled (in this case the buffer + * contains garbage). See [Bug #3002230] + */ + path[0] = '\0'; + + /* * Null for cancel button or invalid dir, otherwise valid. */ |