From 109afe5d319d4dca2d96bb8fcd50f00663d8193b Mon Sep 17 00:00:00 2001 From: Matthieu Gautier Date: Tue, 10 Oct 2023 12:19:01 +0200 Subject: [PATCH] Give the user a change to get help before failing because of missing magic. --- src/zimwriterfs/zimwriterfs.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/zimwriterfs/zimwriterfs.cpp b/src/zimwriterfs/zimwriterfs.cpp index 6027872d..81ff9d20 100644 --- a/src/zimwriterfs/zimwriterfs.cpp +++ b/src/zimwriterfs/zimwriterfs.cpp @@ -488,6 +488,8 @@ void create_zim(const zim::Metadata& metadata) /* Main program entry point */ int main(int argc, char** argv) { + parse_args(argc, argv); + /* Init */ magic = magic_open(MAGIC_MIME); if (magic_load(magic, NULL) != 0) { @@ -499,8 +501,6 @@ int main(int argc, char** argv) pthread_mutex_init(&verboseMutex, NULL); try { - parse_args(argc, argv); - const zim::Metadata metadata = makeMetadata(); if ( !checkMetadata(metadata) ) {