diff options
| author | jvoisin | 2014-01-31 03:54:28 +0000 |
|---|---|---|
| committer | jvoisin | 2014-01-31 03:54:28 +0000 |
| commit | 173449009769ce86493a179acb9c66c87125dce3 (patch) | |
| tree | 8cc035901c9cc254370e74514c2f9a7dcee1b48c /mat-gui | |
| parent | 1ca20db6741dabfbad567aa20bee92069a5ef5c7 (diff) | |
Fix office-format handling by the GUI
Diffstat (limited to 'mat-gui')
| -rwxr-xr-x | mat-gui | 10 |
1 files changed, 7 insertions, 3 deletions
| @@ -409,14 +409,18 @@ non-anonymised) file to output archive')) | |||
| 409 | msg = _('Cleaning %s') % self.liststore[line][1].decode('utf-8', 'replace') | 409 | msg = _('Cleaning %s') % self.liststore[line][1].decode('utf-8', 'replace') |
| 410 | logging.info(msg) | 410 | logging.info(msg) |
| 411 | self.statusbar.push(0, msg) | 411 | self.statusbar.push(0, msg) |
| 412 | if isinstance(self.liststore[line][0].file, archive.GenericArchiveStripper): | 412 | is_archive = isinstance(self.liststore[line][0].file, archive.GenericArchiveStripper) |
| 413 | list_to_add = [] | 413 | is_terminal = isinstance(self.liststore[line][0].file, archive.TerminalZipStripper) |
| 414 | list_to_add = [] | ||
| 415 | if is_archive and not is_terminal: | ||
| 414 | unsupported_list = self.liststore[line][0].file.list_unsupported() | 416 | unsupported_list = self.liststore[line][0].file.list_unsupported() |
| 415 | if type(unsupported_list) == list and unsupported_list: | 417 | if type(unsupported_list) == list and unsupported_list: |
| 416 | logging.debug("Unsupported list: %s" % unsupported_list) | 418 | logging.debug("Unsupported list: %s" % unsupported_list) |
| 417 | filename = os.path.basename(self.liststore[line][0].file.filename) | 419 | filename = os.path.basename(self.liststore[line][0].file.filename) |
| 418 | list_to_add = self.__popup_archive(filename, unsupported_list) | 420 | list_to_add = self.__popup_archive(filename, unsupported_list) |
| 419 | if self.liststore[line][0].file.remove_all(whitelist=list_to_add): | 421 | if self.liststore[line][0].file.remove_all(whitelist=list_to_add): |
| 422 | self.liststore[line][2] = _('Clean') | ||
| 423 | elif self.liststore[line][0].file.remove_all(): | ||
| 420 | self.liststore[line][2] = _('Clean') | 424 | self.liststore[line][2] = _('Clean') |
| 421 | yield True | 425 | yield True |
| 422 | self.statusbar.push(0, _('Ready')) | 426 | self.statusbar.push(0, _('Ready')) |
