Allow matching of empty files

This commit is contained in:
WarmUpTill
2021-06-14 09:34:40 +02:00
committed by WarmUpTill
parent ae4e861f7f
commit 5e4258968a
2 changed files with 2 additions and 2 deletions

View File

@@ -67,7 +67,7 @@ bool MacroConditionFile::checkLocalFileContent()
{
QString t = QString::fromStdString(_text);
QFile file(QString::fromStdString(_file));
if (_file.empty() || !file.open(QIODevice::ReadOnly)) {
if (!file.open(QIODevice::ReadOnly)) {
return false;
}

View File

@@ -205,7 +205,7 @@ bool checkLocalFileContent(FileSwitch &s)
{
QString t = QString::fromStdString(s.text);
QFile file(QString::fromStdString(s.file));
if (s.file.empty() || !file.open(QIODevice::ReadOnly)) {
if (!file.open(QIODevice::ReadOnly)) {
return false;
}