From 22a64b973e5193c05aa4380057d4a1d887caa875 Mon Sep 17 00:00:00 2001 From: Simon Sobisch Date: Fri, 7 Jun 2024 18:45:35 +0000 Subject: [PATCH] chore: 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..a065dc71 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(QStringLiteral("")); + 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.",