addPos in following line won't be processed when exception in write occurs:
d->addPos(d->getFile()->write(aData, aLen), aLen);
That's why I said you that this place is only my guess and I'm not sure where the problem exactly is. The only guarantee is that there's still the problem somewhere (all segments are marked as finished but endData wasn't processed) and bug is NOT fixed.
True,
addPos in following line won't be processed when exception in write occurs: d->getFile( )->write( aData, aLen), aLen);
d->addPos(
That's why I said you that this place is only my guess and I'm not sure where the problem exactly is. The only guarantee is that there's still the problem somewhere (all segments are marked as finished but endData wasn't processed) and bug is NOT fixed.