From 590454e7d5345613da4ee3318ed74001de85ba9b Mon Sep 17 00:00:00 2001 From: jingham Date: Tue, 10 Aug 1999 04:21:35 +0000 Subject: Convert the directory name from Utf to External before passing it to the Toolbox. --- mac/tclMacFile.c | 11 +++++++---- 1 file 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; -- cgit v0.12