summaryrefslogtreecommitdiff
path: root/Build/source/texk/kpathsea/readable.c
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/texk/kpathsea/readable.c')
-rw-r--r--Build/source/texk/kpathsea/readable.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/Build/source/texk/kpathsea/readable.c b/Build/source/texk/kpathsea/readable.c
index d62957e5ba0..3e604cd9c05 100644
--- a/Build/source/texk/kpathsea/readable.c
+++ b/Build/source/texk/kpathsea/readable.c
@@ -40,7 +40,9 @@
static boolean
READABLE(const_string fn, unsigned int st)
{
- if ((st = GetFileAttributes(fn)) != 0xFFFFFFFF) {
+ wchar_t *fnw;
+ fnw = get_wstring_from_fsyscp(fn, fnw=NULL);
+ if ((st = GetFileAttributesW(fnw)) != 0xFFFFFFFF) {
/* succeeded */
errno = 0;
} else {
@@ -56,6 +58,7 @@ READABLE(const_string fn, unsigned int st)
break;
}
}
+ if(fnw) free(fnw);
return ((st != 0xFFFFFFFF) &&
!(st & FILE_ATTRIBUTE_DIRECTORY));
}