diff options
Diffstat (limited to 'src/SFileOpenFileEx.cpp')
-rw-r--r-- | src/SFileOpenFileEx.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/SFileOpenFileEx.cpp b/src/SFileOpenFileEx.cpp index 90c7fab..2954669 100644 --- a/src/SFileOpenFileEx.cpp +++ b/src/SFileOpenFileEx.cpp @@ -155,6 +155,14 @@ bool OpenPatchedFile(HANDLE hMpq, const char * szFileName, HANDLE * PtrFile) hf = hfPatch; } } + + // If the opened file has the delete marker, we don't open the file + if(hfBase && hf && hf->pFileEntry->dwFlags & MPQ_FILE_DELETE_MARKER) + { + SFileCloseFile((HANDLE)(hfBase)); + SetLastError(ERROR_FILE_DELETED); + hfBase = NULL; + } } } else |