diff options
Diffstat (limited to 'src/win95/chnktexi.cpp')
| -rw-r--r-- | src/win95/chnktexi.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/win95/chnktexi.cpp b/src/win95/chnktexi.cpp index 8fe0345..6487737 100644 --- a/src/win95/chnktexi.cpp +++ b/src/win95/chnktexi.cpp @@ -109,12 +109,13 @@ static inline bool IsFileInFastFile(char const * pszFileName) static bool DoesFileExist(char const * pszFileName) { - DWORD dwFileAttributes = GetFileAttributes(pszFileName); - - if (0xffffffff == dwFileAttributes || dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) + unsigned int attr = GetGameFileAttributes(pszFileName, FILETYPE_PERM); + + if ((attr & FILEATTR_DIRECTORY) != 0) return false; - else - return true; + if ((attr & FILEATTR_READABLE) == 0) + return false; + return true; } static char * GetPath(char * pszFileNameBuf, unsigned nBufSize, ImageDescriptor const & idsc, Chunk_With_Children * pEnvDataChunk, bool bGloballyPalettized) |
