Allow BleachBit to be run more than once per day
This commit is contained in:
parent
b043b63d2d
commit
7d1850a480
1 changed files with 24 additions and 27 deletions
|
|
@ -371,11 +371,9 @@ def run_aida64():
|
||||||
def run_bleachbit(cleaners=None, preview=True):
|
def run_bleachbit(cleaners=None, preview=True):
|
||||||
"""Run BleachBit preview and save log.
|
"""Run BleachBit preview and save log.
|
||||||
|
|
||||||
This is a preview so no files should be deleted."""
|
If preview is True then no files should be deleted."""
|
||||||
if not os.path.exists(global_vars['LogDir']+r'\BleachBit.log'):
|
error_path = r'{}\BleachBit.err'.format(global_vars['LogDir'])
|
||||||
debug_path = r'{}\BleachBit.debug'.format(global_vars['LogDir'])
|
log_path = error_path.replace('err', 'log')
|
||||||
error_path = debug_path.replace('debug', 'err')
|
|
||||||
log_path = debug_path.replace('debug', 'log')
|
|
||||||
extract_item('BleachBit', silent=True)
|
extract_item('BleachBit', silent=True)
|
||||||
|
|
||||||
# Safety check
|
# Safety check
|
||||||
|
|
@ -387,8 +385,7 @@ def run_bleachbit(cleaners=None, preview=True):
|
||||||
# Run
|
# Run
|
||||||
cmd = [
|
cmd = [
|
||||||
global_vars['Tools']['BleachBit'],
|
global_vars['Tools']['BleachBit'],
|
||||||
'--preview' if preview else '--clean',
|
'--preview' if preview else '--clean']
|
||||||
'--debug-log="{}"'.format(debug_path)]
|
|
||||||
cmd.extend(cleaners)
|
cmd.extend(cleaners)
|
||||||
out = run_program(cmd, check=False)
|
out = run_program(cmd, check=False)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue