mirror of
https://github.com/tnodir/fort
synced 2024-11-15 05:46:03 +00:00
ConfUtil: Fix comparison with "System".
This commit is contained in:
parent
1dda1b2260
commit
1a6c63ba74
@ -17,8 +17,7 @@ void Test::confWriteRead()
|
||||
conf.ipInclude()->setUseAll(true);
|
||||
conf.ipExclude()->setUseAll(false);
|
||||
|
||||
conf.setAppLogBlocked(true);
|
||||
conf.setAppBlockAll(false);
|
||||
conf.setAppBlockAll(true);
|
||||
conf.setAppAllowAll(false);
|
||||
|
||||
conf.ipInclude()->setText(QString());
|
||||
@ -69,6 +68,7 @@ void Test::confWriteRead()
|
||||
QVERIFY(!FortCommon::confIpInRange(data, NetUtil::textToIp4("193.0.0.0")));
|
||||
|
||||
QVERIFY(FortCommon::confAppBlocked(data, "System"));
|
||||
QVERIFY(!FortCommon::confAppBlocked(data, FileUtil::pathToDosPath("C:\\programs\\skype\\phone\\skype.exe")));
|
||||
QVERIFY(!FortCommon::confAppBlocked(data, FileUtil::pathToDosPath("C:\\utils\\dev\\git\\bin\\git.exe")));
|
||||
QVERIFY(!FortCommon::confAppBlocked(data, FileUtil::pathToDosPath("C:\\Programs\\Skype\\Phone\\Skype.exe").toLower()));
|
||||
QVERIFY(!FortCommon::confAppBlocked(data, FileUtil::pathToDosPath("C:\\Utils\\Dev\\Git\\").toLower()));
|
||||
QVERIFY(FortCommon::confAppBlocked(data, FileUtil::pathToDosPath("C:\\Utils\\Firefox\\Bin\\firefox.exe").toLower()));
|
||||
}
|
||||
|
@ -198,7 +198,7 @@ QString ConfUtil::parseAppPath(const QStringRef &line)
|
||||
const QStringRef path = match.capturedRef(1);
|
||||
|
||||
const QString systemPath("System");
|
||||
if (QStringRef::compare(path, systemPath, Qt::CaseInsensitive))
|
||||
if (!QStringRef::compare(path, systemPath, Qt::CaseInsensitive))
|
||||
return systemPath;
|
||||
|
||||
const QString dosPath = FileUtil::pathToDosPath(path.toString());
|
||||
|
Loading…
Reference in New Issue
Block a user