aboutsummaryrefslogtreecommitdiffstats
path: root/src/database.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-02-12 18:31:00 +0100
committerMax Kellermann <max@duempel.org>2009-02-12 18:31:00 +0100
commitd55f6b53048a26ae495294c36aade82d97b46606 (patch)
tree90c0554dfcebe1f80233a433260a7f924f9bfb2d /src/database.c
parenta2ce6e5b823f5af7ac08380b4acb145713a80c11 (diff)
downloadmpd-d55f6b53048a26ae495294c36aade82d97b46606.tar.gz
mpd-d55f6b53048a26ae495294c36aade82d97b46606.tar.xz
mpd-d55f6b53048a26ae495294c36aade82d97b46606.zip
database: don't load database after charset was reconfigured
When you change the filesystem charset, discard the old database file and create a new one. The old database file will most likely contain stale or invalid information.
Diffstat (limited to 'src/database.c')
-rw-r--r--src/database.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/database.c b/src/database.c
index 1fed8ddcf..413aebdfa 100644
--- a/src/database.c
+++ b/src/database.c
@@ -315,13 +315,11 @@ db_load(void)
tempCharset = path_get_fs_charset();
if (tempCharset != NULL
&& strcmp(fsCharset, tempCharset)) {
- g_message("Using \"%s\" for the "
- "filesystem charset "
+ g_message("Existing database has charset \"%s\" "
"instead of \"%s\"; "
- "maybe you need to "
- "recreate the db?",
- fsCharset, tempCharset);
- path_set_fs_charset(fsCharset);
+ "discarding database file",
+ fsCharset, tempCharset);
+ return false;
}
} else
g_error("unknown line in db info: %s",