From 4d4407ce5aeca700f1da449698ced4e22b50d369 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Fri, 15 Nov 2024 21:48:51 +0100 Subject: [PATCH] Revert "Warn on unknown command line arguments" This reverts commit 8379cc85aad36c6224a7eb163773fe25ca3c811b. This caused some regressions, as this approach doesn't properly handle all possible arguments. --- main/main.cpp | 7 ------- 1 file changed, 7 deletions(-) diff --git a/main/main.cpp b/main/main.cpp index 0a905f16cac..2c41acef8bc 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -1801,13 +1801,6 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph } else if (arg == "--" || arg == "++") { adding_user_args = true; } else { - if (!FileAccess::exists(arg) && !DirAccess::exists(arg)) { - // Warn if the argument isn't recognized by Godot *and* the file/folder - // specified by a positional argument doesn't exist. - // This allows projects to read file or folder paths as a positional argument - // without printing a warning, as this scenario can't make use of user command line arguments. - WARN_PRINT(vformat("Unknown command line argument \"%s\". User arguments should be passed after a -- or ++ separator, e.g. \"-- %s\".", arg, arg)); - } main_args.push_back(arg); }