diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2008-08-23 14:59:04 +0000 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2008-08-23 14:59:04 +0000 |
| commit | 8503419ae3496cd52faee2084966573bc89ebab3 (patch) | |
| tree | a97758e497834cd8af9a9c94bbca11028e70c6ab /src/AbstractDiskWriter.cc | |
| parent | 7e8565f82e907a67e940aa15c3e8553a3c66773f (diff) | |
2008-08-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Fixed error handling of lseek.
* src/AbstractDiskWriter.cc
Diffstat (limited to 'src/AbstractDiskWriter.cc')
| -rw-r--r-- | src/AbstractDiskWriter.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/AbstractDiskWriter.cc b/src/AbstractDiskWriter.cc index 0fd0e485..9ef6d696 100644 --- a/src/AbstractDiskWriter.cc +++ b/src/AbstractDiskWriter.cc @@ -124,7 +124,7 @@ ssize_t AbstractDiskWriter::readDataInternal(unsigned char* data, size_t len) void AbstractDiskWriter::seek(off_t offset) { - if(offset != lseek(fd, offset, SEEK_SET)) { + if(lseek(fd, offset, SEEK_SET) == (off_t)-1) { throw DlAbortEx (StringFormat(EX_FILE_SEEK, filename.c_str(), strerror(errno)).str()); } |
