summaryrefslogtreecommitdiff
path: root/src/win95/chnktexi.cpp
diff options
context:
space:
mode:
authorSteven Fuller <relnev@icculus.org>2001-12-18 05:08:52 +0000
committerPatryk Obara <dreamer.tan@gmail.com>2019-08-20 02:22:37 +0200
commit080430b3bda2bec05362119447d51b6c37f1cfc1 (patch)
treea4d2354ed94acb903f7f79a83e198398cb6eb757 /src/win95/chnktexi.cpp
parent95b8b49b7602e4e2d3cd9e38273fa94451bec780 (diff)
Redid the most of the file loading/saving. Now uses $HOME/.avp/ and
$AVP_DIR to look for files.
Diffstat (limited to 'src/win95/chnktexi.cpp')
-rw-r--r--src/win95/chnktexi.cpp11
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)