mirror of
https://github.com/LongSoft/UEFITool.git
synced 2025-05-12 22:26:13 -04:00
Version 0.17.8
-fixed bugs found by first scan with Coverity Scan
This commit is contained in:
parent
706b0088e3
commit
1df4e4f9d8
3 changed files with 37 additions and 16 deletions
14
uefitool.cpp
14
uefitool.cpp
|
@ -205,6 +205,9 @@ void UEFITool::insert(const UINT8 mode)
|
|||
return;
|
||||
}
|
||||
|
||||
if (path.trimmed().isEmpty())
|
||||
return;
|
||||
|
||||
QFileInfo fileInfo = QFileInfo(path);
|
||||
if (!fileInfo.exists()) {
|
||||
ui->statusBar->showMessage(tr("Please select existing file"));
|
||||
|
@ -304,6 +307,9 @@ void UEFITool::replace(const UINT8 mode)
|
|||
else
|
||||
return;
|
||||
|
||||
if (path.trimmed().isEmpty())
|
||||
return;
|
||||
|
||||
QFileInfo fileInfo = QFileInfo(path);
|
||||
if (!fileInfo.exists()) {
|
||||
ui->statusBar->showMessage(tr("Please select existing file"));
|
||||
|
@ -405,6 +411,9 @@ void UEFITool::extract(const UINT8 mode)
|
|||
else
|
||||
path = QFileDialog::getSaveFileName(this, tr("Save object to file"),".","Binary files (*.bin);;All files (*.*)");
|
||||
|
||||
if (path.trimmed().isEmpty())
|
||||
return;
|
||||
|
||||
QByteArray extracted;
|
||||
UINT8 result = ffsEngine->extract(index, extracted, mode);
|
||||
if (result) {
|
||||
|
@ -421,7 +430,6 @@ void UEFITool::extract(const UINT8 mode)
|
|||
outputFile.resize(0);
|
||||
outputFile.write(extracted);
|
||||
outputFile.close();
|
||||
|
||||
}
|
||||
|
||||
void UEFITool::about()
|
||||
|
@ -484,7 +492,11 @@ void UEFITool::openImageFile()
|
|||
|
||||
void UEFITool::openImageFile(QString path)
|
||||
{
|
||||
if (path.trimmed().isEmpty())
|
||||
return;
|
||||
|
||||
QFileInfo fileInfo = QFileInfo(path);
|
||||
|
||||
if (!fileInfo.exists()) {
|
||||
ui->statusBar->showMessage(tr("Please select existing file"));
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue