summaryrefslogtreecommitdiff
path: root/Build/source/texk/kpathsea/readable.c
diff options
context:
space:
mode:
authorAkira Kakuto <kakuto@fuk.kindai.ac.jp>2013-12-01 16:06:38 +0000
committerAkira Kakuto <kakuto@fuk.kindai.ac.jp>2013-12-01 16:06:38 +0000
commit4813cb6776a1c73bf8e5fea4eec861bb5aec7467 (patch)
treeb1964c427038c0a35c6af569d039417f3d310034 /Build/source/texk/kpathsea/readable.c
parentd1f96f6033d08c0e712307ddc9bc1f63a8540742 (diff)
Support KANJI file name in (e)upTeX on Windows (T. Tanaka)
git-svn-id: svn://tug.org/texlive/trunk@32290 c570f23f-e606-0410-a88d-b1316a301751
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..181b80c3b87 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;
}
}
+ free(fnw);
return ((st != 0xFFFFFFFF) &&
!(st & FILE_ATTRIBUTE_DIRECTORY));
}