summaryrefslogtreecommitdiffstats
path: root/win/tclWinFile.c
diff options
context:
space:
mode:
Diffstat (limited to 'win/tclWinFile.c')
-rw-r--r--win/tclWinFile.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/win/tclWinFile.c b/win/tclWinFile.c
index 880adc0..d0720ab 100644
--- a/win/tclWinFile.c
+++ b/win/tclWinFile.c
@@ -1095,6 +1095,7 @@ TclpMatchInDirectory(
const char *utfname;
int checkDrive = 0, isDrive;
DWORD attr;
+ Tcl_Encoding encoding;
native = data.cFileName;
attr = data.dwFileAttributes;
@@ -1132,6 +1133,7 @@ TclpMatchInDirectory(
* the system.
*/
+ encoding = Tcl_GetEncoding(interp ,NULL);
if (Tcl_StringCaseMatch(utfname, pattern, 1)) {
/*
* If the file matches, then we need to process the remainder
@@ -1150,7 +1152,7 @@ TclpMatchInDirectory(
if (NativeMatchType(isDrive, attr, native, types)) {
Tcl_ListObjAppendElement(interp, resultPtr,
TclNewFSPathObj(pathPtr, utfname,
- Tcl_DStringLength(&ds)));
+ Tcl_DStringLength(&ds), encoding));
}
}