From ee5bbb7f6304c4930899d069c82fe02e49f050aa Mon Sep 17 00:00:00 2001 From: Joe Onorato Date: Mon, 13 Jul 2009 14:44:07 -0700 Subject: Need to skip the padding after reading. m_dataEndPos points to the end of the data, not the beginning of the next entity. --- libs/utils/BackupData.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'libs/utils/BackupData.cpp') diff --git a/libs/utils/BackupData.cpp b/libs/utils/BackupData.cpp index cce754a08213..be04777528ea 100644 --- a/libs/utils/BackupData.cpp +++ b/libs/utils/BackupData.cpp @@ -298,10 +298,12 @@ BackupDataReader::SkipEntityData() } if (m_header.entity.dataSize > 0) { int pos = lseek(m_fd, m_dataEndPos, SEEK_SET); - return pos == -1 ? (int)errno : (int)NO_ERROR; - } else { - return NO_ERROR; + if (pos == -1) { + return errno; + } } + SKIP_PADDING(); + return NO_ERROR; } ssize_t -- cgit v1.2.3-59-g8ed1b