| 1 | 115c115
|
|---|
| 2 | < void ConfigManager::loadFile(const String &filename) {
|
|---|
| 3 | ---
|
|---|
| 4 | > void ConfigManager::loadFile(const String &filenamearg) {
|
|---|
| 5 | 116a117,125
|
|---|
| 6 | > String filename(filenamearg);
|
|---|
| 7 | >
|
|---|
| 8 | > // Try to open config file in preferred location first, but fallback to current directory on failure
|
|---|
| 9 | > if ((filename != DEFAULT_CONFIG_FILE) && !(cfg_file = fopen(filename.c_str(), "r"))) {
|
|---|
| 10 | > warning("Unable to open configuration file: %s", filename.c_str());
|
|---|
| 11 | > warning("Checkng current directory instead...");
|
|---|
| 12 | >
|
|---|
| 13 | > filename = DEFAULT_CONFIG_FILE;
|
|---|
| 14 | > }
|
|---|