aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorTravis Howell2006-01-15 00:22:29 +0000
committerTravis Howell2006-01-15 00:22:29 +0000
commit1b18b98ca5d8059043db60b1c87053bfcd2cbc6f (patch)
tree757f26a6fe4236e4a5e9886febb9e0134f9cd296 /common
parenta4c0d84acb9c8f771403e47ba46f50c2ff4d413b (diff)
downloadscummvm-rg350-1b18b98ca5d8059043db60b1c87053bfcd2cbc6f.tar.gz
scummvm-rg350-1b18b98ca5d8059043db60b1c87053bfcd2cbc6f.tar.bz2
scummvm-rg350-1b18b98ca5d8059043db60b1c87053bfcd2cbc6f.zip
Update confusing warning.
Check that config file location is writable. svn-id: r20034
Diffstat (limited to 'common')
-rw-r--r--common/config-manager.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/common/config-manager.cpp b/common/config-manager.cpp
index 44152c38a1..5837334497 100644
--- a/common/config-manager.cpp
+++ b/common/config-manager.cpp
@@ -115,6 +115,7 @@ void ConfigManager::loadDefaultConfigFile() {
#endif
loadConfigFile(configFile);
+ flushToDisk();
}
void ConfigManager::loadConfigFile(const String &filename) {
@@ -135,7 +136,7 @@ void ConfigManager::loadFile(const String &filename) {
File cfg_file;
if (!cfg_file.open(filename.c_str())) {
- warning("Unable to open configuration file: %s", filename.c_str());
+ printf("Creating configuration file: %s\n", filename.c_str());
} else {
char buf[MAXLINELEN];
String domain;
@@ -228,7 +229,7 @@ void ConfigManager::flushToDisk() {
// return;
if (!(cfg_file = fopen(_filename.c_str(), "w"))) {
- warning("Unable to write configuration file: %s", _filename.c_str());
+ error("Unable to write configuration file: %s", _filename.c_str());
} else {
// First write the domains in _domainSaveOrder, in that order.