From 7064472e0bcc0ba6aa1fa192c05b0eed1ca12021 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Fri, 16 Apr 2021 03:33:47 -0600 Subject: [PATCH] Fix SFC scan --- scripts/wk/os/win.py | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/scripts/wk/os/win.py b/scripts/wk/os/win.py index 415679e5..27bab457 100644 --- a/scripts/wk/os/win.py +++ b/scripts/wk/os/win.py @@ -16,7 +16,6 @@ except ImportError as err: from wk.borrowed import acpi from wk.exe import get_procs, run_program, wait_for_procs -from wk.io import non_clobber_path from wk.log import format_log_path from wk.std import GenericError, GenericWarning, sleep @@ -397,17 +396,13 @@ def run_sfc_scan(): err_path = log_path.with_suffix('.err') # Run SFC - proc = run_program(cmd, check=False, encoding='utf-16') - - # Fix paths - log_path = non_clobber_path(log_path) - err_path = non_clobber_path(err_path) + proc = run_program(cmd, check=False, encoding='utf-16le') # Save output os.makedirs(log_path.parent, exist_ok=True) - with open(log_path, 'w') as _f: + with open(log_path, 'a') as _f: _f.write(proc.stdout) - with open(err_path, 'w') as _f: + with open(err_path, 'a') as _f: _f.write(proc.stderr) # Check result