mirror of
https://github.com/cmclark00/retro-imager.git
synced 2025-05-18 07:55:21 +01:00
Close files on error
This commit is contained in:
parent
9a263f0211
commit
19bfc8eacb
3 changed files with 34 additions and 26 deletions
|
@ -36,6 +36,7 @@ void LocalFileExtractThread::run()
|
|||
if (!_inputfile.open(_inputfile.ReadOnly))
|
||||
{
|
||||
_onDownloadError(tr("Error opening image file"));
|
||||
_closeFiles();
|
||||
return;
|
||||
}
|
||||
_lastDlTotal = _inputfile.size();
|
||||
|
@ -45,6 +46,8 @@ void LocalFileExtractThread::run()
|
|||
else
|
||||
extractMultiFileRun();
|
||||
|
||||
if (_cancelled)
|
||||
_closeFiles();
|
||||
}
|
||||
|
||||
ssize_t LocalFileExtractThread::_on_read(struct archive *, const void **buff)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue