mirror of https://github.com/aria2/aria2
2008-08-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Fixed error handling of lseek. * src/AbstractDiskWriter.ccpull/1/head
parent
7e8565f82e
commit
8503419ae3
|
@ -1,3 +1,8 @@
|
|||
2008-08-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
|
||||
|
||||
Fixed error handling of lseek.
|
||||
* src/AbstractDiskWriter.cc
|
||||
|
||||
2008-08-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
|
||||
|
||||
Removed "(1.x/2.x)" from TEXT_LOAD_COOKIES since aria2 can load Firefox3
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue