From ceb01441f5ca16d919ecae3b2c3e5be0672bf7fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damian=20B=C3=BCchel?= Date: Mon, 31 May 2021 20:26:15 +0200 Subject: [PATCH] SEBWIN-492: Fixed bug with auto-insertion of prohibited processes in legacy configuration tool. --- SebWindowsConfig/SEBSettings.cs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/SebWindowsConfig/SEBSettings.cs b/SebWindowsConfig/SEBSettings.cs index 3a4c049f..de2a770a 100644 --- a/SebWindowsConfig/SEBSettings.cs +++ b/SebWindowsConfig/SEBSettings.cs @@ -1570,11 +1570,13 @@ namespace SebWindowsConfig { DictObj prohibitedProcessData = (DictObj)SEBSettings.prohibitedProcessList[listIndex]; - // Check if this prohibited process already is in Prohibited Process list in current settings - if (Path.GetFileNameWithoutExtension((string)prohibitedProcessData[SEBSettings.KeyOriginalName]).Equals(prohibitedProcessFilenameWithoutExtension, StringComparison.InvariantCultureIgnoreCase) || - Path.GetFileNameWithoutExtension((string)prohibitedProcessData[SEBSettings.KeyExecutable]).Equals(prohibitedProcessFilenameWithoutExtension, StringComparison.InvariantCultureIgnoreCase)) - indexOfProcess = listIndex; - + if ((int) prohibitedProcessData[SEBSettings.KeyOS] == IntWin) + { + // Check if this prohibited process already is in Prohibited Process list in current settings + 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 // If this default prohibited process was not in Prohibited Process list, insert it at the beginning