fix: sanitize settings JSON, asyncio get_running_loop, Defender exclusion, _btn cleanup, ASCII Save label
Made-with: Cursor
This commit is contained in:
@@ -22,9 +22,13 @@ GOST_RELEASE_ZIP = (
|
||||
def _add_defender_exclusion(path: Path) -> None:
|
||||
"""Add Windows Defender exclusion so GOST is not quarantined."""
|
||||
try:
|
||||
# ExclusionPath covers gost.exe under this folder; avoid invalid combined params on older builds.
|
||||
folder = str(path.parent).replace("'", "''")
|
||||
subprocess.run(
|
||||
["powershell", "-NoProfile", "-NonInteractive", "-Command",
|
||||
f"Add-MpPreference -ExclusionPath '{path.parent}' -ExclusionProcess 'gost.exe' -ErrorAction SilentlyContinue"],
|
||||
[
|
||||
"powershell", "-NoProfile", "-NonInteractive", "-Command",
|
||||
f"Add-MpPreference -ExclusionPath '{folder}' -ErrorAction SilentlyContinue",
|
||||
],
|
||||
capture_output=True,
|
||||
timeout=30,
|
||||
creationflags=getattr(subprocess, "CREATE_NO_WINDOW", 0),
|
||||
|
||||
Reference in New Issue
Block a user