diff options
author | Ladislav Zezula <zezula@volny.cz> | 2025-08-06 09:38:55 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-08-06 09:38:55 +0200 |
commit | 36d76cddbfa02624617bb112da0b72e919f0cf33 (patch) | |
tree | cbe34ab3d2d2c7ab784ba890b7d2a3436bb6795b /src/SFileAttributes.cpp | |
parent | b41cda40f9c3fbdb802cf63e739425cd805eecaa (diff) | |
parent | db410fd564af358cb7c1e2e72cdbaeaeef510e09 (diff) |
Merge pull request #393 from ladislav-zezula/LZ_BlizzardCompatibleNames
* Replaced GetLastError with SErrGetLastError
* Members of TMPQHash have now the same names like in Blizzard sources
* Fixed bug in SFileRenameFile that falsely reported an existing file if it had different locale.
Diffstat (limited to 'src/SFileAttributes.cpp')
-rw-r--r-- | src/SFileAttributes.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/SFileAttributes.cpp b/src/SFileAttributes.cpp index dbcc456..7a26562 100644 --- a/src/SFileAttributes.cpp +++ b/src/SFileAttributes.cpp @@ -392,7 +392,7 @@ DWORD SAttrLoadAttributes(TMPQArchive * ha) // Load the entire file to memory
if(!SFileReadFile(hFile, pbAttrFile, cbAttrFile, &dwBytesRead, NULL))
- ha->dwFlags |= (GetLastError() == ERROR_FILE_CORRUPT) ? MPQ_FLAG_MALFORMED : 0;
+ ha->dwFlags |= (SErrGetLastError() == ERROR_FILE_CORRUPT) ? MPQ_FLAG_MALFORMED : 0;
// Parse the (attributes)
if(dwBytesRead == cbAttrFile)
@@ -478,7 +478,7 @@ DWORD WINAPI SFileGetAttributes(HANDLE hMpq) // Verify the parameters
if(!IsValidMpqHandle(hMpq))
{
- SetLastError(ERROR_INVALID_PARAMETER);
+ SErrSetLastError(ERROR_INVALID_PARAMETER);
return SFILE_INVALID_ATTRIBUTES;
}
@@ -492,14 +492,14 @@ bool WINAPI SFileSetAttributes(HANDLE hMpq, DWORD dwFlags) // Verify the parameters
if(!IsValidMpqHandle(hMpq))
{
- SetLastError(ERROR_INVALID_PARAMETER);
+ SErrSetLastError(ERROR_INVALID_PARAMETER);
return false;
}
// Not allowed when the archive is read-only
if(ha->dwFlags & MPQ_FLAG_READ_ONLY)
{
- SetLastError(ERROR_ACCESS_DENIED);
+ SErrSetLastError(ERROR_ACCESS_DENIED);
return false;
}
@@ -523,14 +523,14 @@ bool WINAPI SFileUpdateFileAttributes(HANDLE hMpq, const char * szFileName) // Verify the parameters
if(!IsValidMpqHandle(ha))
{
- SetLastError(ERROR_INVALID_PARAMETER);
+ SErrSetLastError(ERROR_INVALID_PARAMETER);
return false;
}
// Not allowed when the archive is read-only
if(ha->dwFlags & MPQ_FLAG_READ_ONLY)
{
- SetLastError(ERROR_ACCESS_DENIED);
+ SErrSetLastError(ERROR_ACCESS_DENIED);
return false;
}
|