diff options
author | rbuj <[email protected]> | 2019-09-16 11:22:15 +0200 |
---|---|---|
committer | ZenWalker <[email protected]> | 2019-10-03 12:02:24 +0200 |
commit | 762df5150f50777fd1bfbe3fc7a546f4a4f1bb4b (patch) | |
tree | f18d0645c8bbf434b704f9e1e23b40615f033cc2 /src | |
parent | 7d5048dcb46585fd4328ad1c2a4942aee02a22a0 (diff) | |
download | engrampa-762df5150f50777fd1bfbe3fc7a546f4a4f1bb4b.tar.bz2 engrampa-762df5150f50777fd1bfbe3fc7a546f4a4f1bb4b.tar.xz |
LHA: add test for checking compressed file integrity
Diffstat (limited to 'src')
-rw-r--r-- | src/fr-command-lha.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/fr-command-lha.c b/src/fr-command-lha.c index b34f886..0adfcc1 100644 --- a/src/fr-command-lha.c +++ b/src/fr-command-lha.c @@ -309,6 +309,16 @@ fr_command_lha_extract (FrCommand *comm, } +static void +fr_command_lha_test (FrCommand *comm) +{ + fr_process_begin_command (comm->process, "lha"); + fr_process_add_arg (comm->process, "t"); + fr_process_add_arg (comm->process, comm->filename); + fr_process_end_command (comm->process); +} + + const char *lha_mime_type[] = { "application/x-lzh-compressed", "application/x-lha", NULL }; @@ -357,6 +367,7 @@ fr_command_lha_class_init (FrCommandLhaClass *class) afc->add = fr_command_lha_add; afc->delete = fr_command_lha_delete; afc->extract = fr_command_lha_extract; + afc->test = fr_command_lha_test; afc->get_mime_types = fr_command_lha_get_mime_types; afc->get_capabilities = fr_command_lha_get_capabilities; afc->get_packages = fr_command_lha_get_packages; @@ -373,7 +384,7 @@ fr_command_lha_init (FrCommand *comm) comm->propExtractCanSkipOlder = FALSE; comm->propExtractCanJunkPaths = TRUE; comm->propPassword = FALSE; - comm->propTest = FALSE; + comm->propTest = TRUE; } |