mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-07 07:04:16 +02:00
[improvement][arch] 'clean cache' removing the whole folder instead of each file
This commit is contained in:
@@ -6,6 +6,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||
|
||||
## [0.9.3] 2020
|
||||
### Fixes
|
||||
- Arch
|
||||
- 'clean cache' operation was not working in some scenarios
|
||||
|
||||
- upgrade: crashing for scenarios when there are packages that cannot upgrade to be displayed on the summary window
|
||||
- settings: crashing when an empty Qt style is defined [#104](https://github.com/vinifmor/bauh/issues/104)
|
||||
|
||||
|
||||
@@ -2165,20 +2165,16 @@ class ArchManager(SoftwareManager):
|
||||
deny_label=self.i18n['cancel'].capitalize()):
|
||||
|
||||
handler = ProcessHandler(watcher)
|
||||
success = True
|
||||
for f in glob.glob('{}/*'.format(cache_dir)):
|
||||
rm = SimpleProcess(cmd=['rm', '-rf', f], root_password=root_password)
|
||||
|
||||
success, _ = handler.handle_simple(rm)
|
||||
|
||||
if not success:
|
||||
success = False
|
||||
break
|
||||
rm = SimpleProcess(cmd=['rm', '-rf', cache_dir], root_password=root_password)
|
||||
success, _ = handler.handle_simple(rm)
|
||||
|
||||
if success:
|
||||
watcher.show_message(title=self.i18n['arch.custom_action.clean_cache'].capitalize(),
|
||||
body=self.i18n['arch.custom_action.clean_cache.success'],
|
||||
type_=MessageType.INFO)
|
||||
|
||||
mkcache = SimpleProcess(cmd=['mkdir', '-p', cache_dir], root_password=root_password)
|
||||
handler.handle_simple(mkcache)
|
||||
return True
|
||||
else:
|
||||
watcher.show_message(title=self.i18n['arch.custom_action.clean_cache'].capitalize(),
|
||||
|
||||
Reference in New Issue
Block a user