diff options
author | Max Kellermann <max@duempel.org> | 2009-02-12 18:31:00 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2009-02-12 18:31:00 +0100 |
commit | d55f6b53048a26ae495294c36aade82d97b46606 (patch) | |
tree | 90c0554dfcebe1f80233a433260a7f924f9bfb2d | |
parent | a2ce6e5b823f5af7ac08380b4acb145713a80c11 (diff) | |
download | mpd-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.
-rw-r--r-- | src/database.c | 10 |
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", |