Commit f1444e45 authored by Elvis Angelaccio's avatar Elvis Angelaccio
Browse files

Stop crashing when invoking batch mode without urls

Running `ark --batch --autodestination` from CLI means `urls` will be
empty, so we need to abort instead of crashing at the `` below.
parent 1ef618e5
......@@ -266,6 +266,11 @@ int main(int argc, char **argv)
} else if (parser.isSet(QStringLiteral("batch"))) {
if (urls.isEmpty()) {
qCDebug(ARK) << "No urls to be extracted were provided.";
BatchExtract *batchJob = new BatchExtract(&application);
QObject::connect(batchJob, &KJob::result, &application, &QCoreApplication::quit, Qt::QueuedConnection);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment