mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
Reset last error before moving the file pointer.
svn path=/trunk/; revision=5932
This commit is contained in:
parent
b69868a964
commit
45d8282507
1 changed files with 4 additions and 0 deletions
|
@ -2020,6 +2020,7 @@ unsigned long CCabinet::ReadString(char* String, unsigned long MaxLength)
|
|||
/* Back up some bytes */
|
||||
Size = (BytesRead - Size) - 1;
|
||||
#if defined(WIN32)
|
||||
SetLastError(NO_ERROR);
|
||||
(unsigned int)SetFilePointer(FileHandle,
|
||||
-(long)Size,
|
||||
NULL,
|
||||
|
@ -2055,12 +2056,14 @@ unsigned long CCabinet::ReadFileTable()
|
|||
|
||||
/* Seek to file table */
|
||||
#if defined(WIN32)
|
||||
SetLastError(NO_ERROR);
|
||||
(unsigned int)SetFilePointer(FileHandle,
|
||||
CABHeader.FileTableOffset,
|
||||
NULL,
|
||||
FILE_BEGIN);
|
||||
if (GetLastError() != NO_ERROR) {
|
||||
DPRINT(MIN_TRACE, ("SetFilePointer() failed.\n"));
|
||||
DPRINT(MIN_TRACE, ("Error: %lu\n", GetLastError()));
|
||||
return CAB_STATUS_INVALID_CAB;
|
||||
}
|
||||
#else
|
||||
|
@ -2136,6 +2139,7 @@ unsigned long CCabinet::ReadDataBlocks(PCFFOLDER_NODE FolderNode)
|
|||
|
||||
/* Seek to data block */
|
||||
#if defined(WIN32)
|
||||
SetLastError(NO_ERROR);
|
||||
(unsigned int)SetFilePointer(FileHandle,
|
||||
AbsoluteOffset,
|
||||
NULL,
|
||||
|
|
Loading…
Reference in a new issue