From f4b7b4d8609b61d122f213e61564d1cedbb5ba2c Mon Sep 17 00:00:00 2001 From: Simon Sobisch Date: Tue, 17 Sep 2024 11:41:27 +0000 Subject: [PATCH] feat: ignore empty command line arguments Those can be passed by tools calling HotSpot and lead to "File '' does not exist." error messages. --- src/main.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main.cpp b/src/main.cpp index 58e46ca8..e37f087a 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -202,6 +202,10 @@ int main(int argc, char** argv) applyCliArgs(settings); auto files = parser.positionalArguments(); + + // remove empty arguments that may be added by tools calling HotSpot + files.removeAll(QString()); + if (files.size() != 1 && parser.isSet(exportTo)) { QTextStream err(stderr); err << QCoreApplication::translate("main", "Error: expected a single input file to convert, instead of %1.",