From 080430b3bda2bec05362119447d51b6c37f1cfc1 Mon Sep 17 00:00:00 2001 From: Steven Fuller Date: Tue, 18 Dec 2001 05:08:52 +0000 Subject: Redid the most of the file loading/saving. Now uses $HOME/.avp/ and $AVP_DIR to look for files. --- src/win95/chnktexi.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/win95/chnktexi.cpp') 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) -- cgit v1.3