SEBWIN-492: Fixed bug with auto-insertion of prohibited processes in legacy configuration tool.

This commit is contained in:
Damian Büchel 2021-05-31 20:26:15 +02:00
parent 025febc124
commit ceb01441f5

View file

@ -1570,11 +1570,13 @@ namespace SebWindowsConfig
{ {
DictObj prohibitedProcessData = (DictObj)SEBSettings.prohibitedProcessList[listIndex]; DictObj prohibitedProcessData = (DictObj)SEBSettings.prohibitedProcessList[listIndex];
// Check if this prohibited process already is in Prohibited Process list in current settings if ((int) prohibitedProcessData[SEBSettings.KeyOS] == IntWin)
if (Path.GetFileNameWithoutExtension((string)prohibitedProcessData[SEBSettings.KeyOriginalName]).Equals(prohibitedProcessFilenameWithoutExtension, StringComparison.InvariantCultureIgnoreCase) || {
Path.GetFileNameWithoutExtension((string)prohibitedProcessData[SEBSettings.KeyExecutable]).Equals(prohibitedProcessFilenameWithoutExtension, StringComparison.InvariantCultureIgnoreCase)) // Check if this prohibited process already is in Prohibited Process list in current settings
indexOfProcess = listIndex; if (Path.GetFileNameWithoutExtension((string)prohibitedProcessData[SEBSettings.KeyOriginalName]).Equals(prohibitedProcessFilenameWithoutExtension, StringComparison.InvariantCultureIgnoreCase) ||
Path.GetFileNameWithoutExtension((string)prohibitedProcessData[SEBSettings.KeyExecutable]).Equals(prohibitedProcessFilenameWithoutExtension, StringComparison.InvariantCultureIgnoreCase))
indexOfProcess = listIndex;
}
} // next listIndex } // next listIndex
// If this default prohibited process was not in Prohibited Process list, insert it at the beginning // If this default prohibited process was not in Prohibited Process list, insert it at the beginning