File Commander doesn't detect failure to unpack

Issue #694 resolved
prl created an issue

The issue is due to the fact that FileCommander.addons.unarchiver.ArchiverMenuScreen.extractDone() ignores its data parameter, which contains the exit status of the archive program run, and always reports "successful[sic] extracted". It also doesn't display any stderr output.

Replication

Create an archive file in an illegal format (e.g. an empty .tar file).

Open File Commander, MENU>Sources / Files from live TV, then navigate to the archive file, and select it with OK. In the popup window, select "Unpack to current folder". A message popup will be shown with the text "archive_file successful extracted." even though that is incorrect and the extraction failed.

Comments (2)

  1. Peter Urbanec

    Fix bug #694: File Commander doesn't detect failure to unpack

    In ArchiverMenuScreen, instead of passing both stdout and stderr to self.log(), only pass stdout to self.log(), and accumulate stderr in self.errlog.

    In ArchiverMenuScreen.extractDone(), give a "successfully extracted" TYPE_INFO MessageBox only if the exit code returned from the archive extraction program was 0. Otherwise, show a TYPE_ERROR message box with "extraction errors", and the programs stderr output. In the error case, make the timeout 15 sec (and leave the original 8 second timeout for the non-error case.

    In RarMenuScreen, add an extractDone() method that uses the program's exit code to add more information about the error to the stderr buffer. The unrar program is inconsistent about what is logged to stderr and stdout - for example, while most of its error messages go to stderr, they only go to stdout if the archive fle argument is not actually a RAR file.

    → <<cset 79f08b4c98c9>>

  2. Log in to comment