From 45d828250732282789cd3ddb06de65ab31235154 Mon Sep 17 00:00:00 2001 From: Eric Kohl Date: Sat, 30 Aug 2003 13:32:52 +0000 Subject: [PATCH] Reset last error before moving the file pointer. svn path=/trunk/; revision=5932 --- reactos/tools/cabman/cabinet.cxx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/reactos/tools/cabman/cabinet.cxx b/reactos/tools/cabman/cabinet.cxx index 1a9051f293b..07c5874478c 100755 --- a/reactos/tools/cabman/cabinet.cxx +++ b/reactos/tools/cabman/cabinet.cxx @@ -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,