mirror of https://github.com/aria2/aria2
Fix bug that zero length file is not opened when flushing cache
This bug was only seen when MultiDiskAdaptor was used.pull/235/merge
parent
e2ff45f326
commit
442e460055
|
@ -405,6 +405,9 @@ void MultiDiskAdaptor::writeCache(const WrDiskCacheEntry* entry)
|
||||||
for(; dent != eod; ++dent) {
|
for(; dent != eod; ++dent) {
|
||||||
int64_t lstart = 0, lp = 0;
|
int64_t lstart = 0, lp = 0;
|
||||||
auto& fent = (*dent)->getFileEntry();
|
auto& fent = (*dent)->getFileEntry();
|
||||||
|
if(fent->getLength() == 0) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
for(; i != eoi;) {
|
for(; i != eoi;) {
|
||||||
if(std::max(fent->getOffset(),
|
if(std::max(fent->getOffset(),
|
||||||
static_cast<int64_t>((*i)->goff + celloff)) <
|
static_cast<int64_t>((*i)->goff + celloff)) <
|
||||||
|
|
Loading…
Reference in New Issue