summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjingham <jingham>1999-08-10 04:21:35 (GMT)
committerjingham <jingham>1999-08-10 04:21:35 (GMT)
commit590454e7d5345613da4ee3318ed74001de85ba9b (patch)
tree0533635658f34f388349fc560bb1d0565a12ed25
parent24e9f11aa2c7e32ed6e8a0e6a2c7ae4f0ff12bac (diff)
downloadtcl-590454e7d5345613da4ee3318ed74001de85ba9b.zip
tcl-590454e7d5345613da4ee3318ed74001de85ba9b.tar.gz
tcl-590454e7d5345613da4ee3318ed74001de85ba9b.tar.bz2
Convert the directory name from Utf to External before passing it to the Toolbox.
-rw-r--r--mac/tclMacFile.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/mac/tclMacFile.c b/mac/tclMacFile.c
index 45e0181..b3175d9 100644
--- a/mac/tclMacFile.c
+++ b/mac/tclMacFile.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclMacFile.c,v 1.7 1999/05/11 07:12:09 jingham Exp $
+ * RCS: @(#) $Id: tclMacFile.c,v 1.8 1999/08/10 04:21:35 jingham Exp $
*/
/*
@@ -129,7 +129,7 @@ TclpMatchFiles(
* point to a location in pattern and must
* not be static.*/
{
- char *dirName, *patternEnd = tail;
+ char *patternEnd = tail;
char savedChar;
int result = TCL_OK;
int baseLength = Tcl_DStringLength(dirPtr);
@@ -147,8 +147,11 @@ TclpMatchFiles(
* directory.
*/
- dirName = dirPtr->string;
- FSpLocationFromPath(strlen(dirName), dirName, &dirSpec);
+ Tcl_UtfToExternalDString(NULL, dirPtr->string, dirPtr->length, &fileString);
+
+ FSpLocationFromPath(fileString.length, fileString.string, &dirSpec);
+ Tcl_DStringFree(&fileString);
+
err = FSpGetDirectoryID(&dirSpec, &dirID, &isDirectory);
if ((err != noErr) || !isDirectory) {
return TCL_OK;