mirror of
https://github.com/tumic0/GPXSee.git
synced 2024-11-30 22:51:16 +01:00
Proper cleanup.
This commit is contained in:
parent
ad154dfd7d
commit
1a8114af8e
@ -73,12 +73,14 @@ bool Tar::loadTar()
|
||||
while ((ret = _file.read(buffer, BLOCKSIZE)) > 0) {
|
||||
if (ret < BLOCKSIZE) {
|
||||
_file.close();
|
||||
_index.clear();
|
||||
return false;
|
||||
}
|
||||
size = number(hdr->size, sizeof(hdr->size));
|
||||
_index.insert(hdr->name, _file.pos() / BLOCKSIZE - 1);
|
||||
if (!_file.seek(_file.pos() + BLOCKCOUNT(size) * BLOCKSIZE)) {
|
||||
_file.close();
|
||||
_index.clear();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user