From 05f7fcc8a610f4740564e23903a4f39af74c7f9a Mon Sep 17 00:00:00 2001 From: Fedor Date: Sat, 30 Mar 2019 05:04:03 +0300 Subject: [PATCH] Check for osint argument when checking for greomni and appomni arguments --- toolkit/xre/nsAppRunner.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp index 155d5c498..61c05ae2a 100644 --- a/toolkit/xre/nsAppRunner.cpp +++ b/toolkit/xre/nsAppRunner.cpp @@ -4189,9 +4189,12 @@ XRE_InitCommandLine(int aArgc, char* aArgv[]) #endif const char *path = nullptr; - ArgResult ar = CheckArg("greomni", false, &path); + ArgResult ar = CheckArg("greomni", true, &path); if (ar == ARG_BAD) { - PR_fprintf(PR_STDERR, "Error: argument --greomni requires a path argument\n"); + PR_fprintf(PR_STDERR, + "Error: argument --greomni requires a path argument or the " + "--osint argument was specified with the --greomni argument " + "which is invalid.\n"); return NS_ERROR_FAILURE; } @@ -4205,9 +4208,12 @@ XRE_InitCommandLine(int aArgc, char* aArgv[]) return rv; } - ar = CheckArg("appomni", false, &path); + ar = CheckArg("appomni", true, &path); if (ar == ARG_BAD) { - PR_fprintf(PR_STDERR, "Error: argument --appomni requires a path argument\n"); + PR_fprintf(PR_STDERR, + "Error: argument --appomni requires a path argument or the " + "--osint argument was specified with the --appomni argument " + "which is invalid.\n"); return NS_ERROR_FAILURE; }