Fixing --help string for -p option

* Tweaked the profile mananger to allow to load profiles either with or
without the file extension
* Changed the --help string to reflect the change
This commit is contained in:
Chris 2021-03-24 23:05:21 +11:00 committed by Adam Honse
parent 69cb7a0d9e
commit d65def0179
2 changed files with 2 additions and 4 deletions

View file

@ -133,7 +133,7 @@ std::vector<RGBController*> ProfileManager::LoadProfileToList
}
else
{
filename += ".orp";
filename += ((filename.substr(filename.size() - 4)==".orp") ? "" : ".orp");
}
/*---------------------------------------------------------*\
@ -318,8 +318,6 @@ bool ProfileManager::LoadProfileWithOptions
std::vector<bool> temp_controller_used;
bool ret_val = false;
std::string filename = configuration_directory + profile_name + ".orp";
/*---------------------------------------------------------*\
| Get the list of controllers from the resource manager |
\*---------------------------------------------------------*/

View file

@ -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";