diff --git a/ProfileManager.cpp b/ProfileManager.cpp index 575a8547..4cddf597 100644 --- a/ProfileManager.cpp +++ b/ProfileManager.cpp @@ -133,7 +133,7 @@ std::vector ProfileManager::LoadProfileToList } else { - filename += ".orp"; + filename += ((filename.substr(filename.size() - 4)==".orp") ? "" : ".orp"); } /*---------------------------------------------------------*\ @@ -318,8 +318,6 @@ bool ProfileManager::LoadProfileWithOptions std::vector temp_controller_used; bool ret_val = false; - std::string filename = configuration_directory + profile_name + ".orp"; - /*---------------------------------------------------------*\ | Get the list of controllers from the resource manager | \*---------------------------------------------------------*/ diff --git a/cli.cpp b/cli.cpp index 9dc23a8f..432d7be8 100644 --- a/cli.cpp +++ b/cli.cpp @@ -372,7 +372,7 @@ void OptionHelp() help_text += " Must be specified after specifying a zone.\n"; help_text += " If the specified size is out of range, or the zone does not offer resizing capability, the size will not be changed\n"; help_text += "-V, --version Display version and software build information\n"; - help_text += "-p, --profile filename.orp Load the profile from filename.orp\n"; + help_text += "-p, --profile filename[.orp] Load the profile from filename/filename.orp\n"; help_text += "-sp, --save-profile filename.orp Save the given settings to profile filename.orp\n"; help_text += "--i2c-tools Shows the I2C/SMBus Tools page in the GUI. Implies --gui, even if not specified.\n"; help_text += " USE I2C TOOLS AT YOUR OWN RISK! Don't use this option if you don't know what you're doing!\n";