summaryrefslogtreecommitdiff
path: root/Build/source/texk/kpathsea/elt-dirs.c
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/texk/kpathsea/elt-dirs.c')
-rw-r--r--Build/source/texk/kpathsea/elt-dirs.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/Build/source/texk/kpathsea/elt-dirs.c b/Build/source/texk/kpathsea/elt-dirs.c
index 271b693b5dc..7d61d850086 100644
--- a/Build/source/texk/kpathsea/elt-dirs.c
+++ b/Build/source/texk/kpathsea/elt-dirs.c
@@ -104,9 +104,7 @@ static void expand_elt (kpathsea, str_llist_type *, string, unsigned);
#ifdef WIN32
/* Shared across recursive calls, it acts like a stack. */
-static char dirname[MAX_PATH*2];
-static wchar_t dirnamew[MAX_PATH];
-static char *potname;
+static char dirname[MAX_PATH];
#endif
static void
@@ -133,8 +131,7 @@ do_subdir (kpathsea kpse, str_llist_type *str_list_ptr, string elt,
#if defined (WIN32)
strcpy(dirname, FN_STRING(name));
strcat(dirname, "/*.*"); /* "*.*" or "*" -- seems equivalent. */
- get_wstring_from_fsyscp(dirname, dirnamew);
- hnd = FindFirstFileW(dirnamew, &find_file_data);
+ hnd = FindFirstFile(dirname, &find_file_data);
if (hnd == INVALID_HANDLE_VALUE) {
fn_free(&name);
@@ -154,13 +151,11 @@ do_subdir (kpathsea kpse, str_llist_type *str_list_ptr, string elt,
}
proceed = 1;
while (proceed) {
- if (find_file_data.cFileName[0] != L'.') {
+ if (find_file_data.cFileName[0] != '.') {
int links;
/* Construct the potential subdirectory name. */
- potname = get_fsyscp_from_wstring(find_file_data.cFileName, potname=NULL);
- fn_str_grow (&name, potname);
- free(potname);
+ fn_str_grow (&name, find_file_data.cFileName);
/* Maybe we have cached the leafness of this directory.
The function will return 0 if unknown,
@@ -202,7 +197,7 @@ do_subdir (kpathsea kpse, str_llist_type *str_list_ptr, string elt,
}
fn_shrink_to (&name, elt_length);
}
- proceed = FindNextFileW (hnd, &find_file_data);
+ proceed = FindNextFile (hnd, &find_file_data);
}
/* Update the leafness of name. */
kpathsea_dir_links(kpse, FN_STRING(name), nlinks);