From cbfc1f2845b812f22765fcd51a86c988b41ff76b Mon Sep 17 00:00:00 2001 From: nsubiron Date: Wed, 10 May 2017 12:24:13 +0200 Subject: [PATCH] Make command-line argument -carla-settings accept relative paths --- Source/Carla/Game/CarlaSettings.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Source/Carla/Game/CarlaSettings.cpp b/Source/Carla/Game/CarlaSettings.cpp index 03adea5f4..6329960ec 100644 --- a/Source/Carla/Game/CarlaSettings.cpp +++ b/Source/Carla/Game/CarlaSettings.cpp @@ -154,6 +154,9 @@ static bool GetSettingsFileName(FString &Value) { // Try to get it from the command-line arguments. if (FParse::Value(FCommandLine::Get(), TEXT("-carla-settings="), Value)) { + if (FPaths::IsRelative(Value)) { + Value = FPaths::ConvertRelativePathToFull(FPaths::LaunchDir(), Value); + } if (FPaths::FileExists(Value)) { return true; }