diff options
Diffstat (limited to 'Build/source/texk/kpathsea/win32/dirutil.c')
-rw-r--r-- | Build/source/texk/kpathsea/win32/dirutil.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/Build/source/texk/kpathsea/win32/dirutil.c b/Build/source/texk/kpathsea/win32/dirutil.c index fbedd4c9b8b..db0525f6529 100644 --- a/Build/source/texk/kpathsea/win32/dirutil.c +++ b/Build/source/texk/kpathsea/win32/dirutil.c @@ -7,18 +7,9 @@ int is_dir (char *buff) { - HANDLE h; - WIN32_FIND_DATA w32fd; + struct stat stats; - if (((h = FindFirstFile (buff, &w32fd)) - != INVALID_HANDLE_VALUE) && - (w32fd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)) { - FindClose (h); - return (1); - } else { - FindClose (h); - return (0); - } + return stat (buff, &stats) == 0 && S_ISDIR (stats.st_mode); } /* make a directory */ |