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.
This commit is contained in:
parent
a2ce6e5b82
commit
d55f6b5304
|
@ -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",
|
||||
|
|
Loading…
Reference in New Issue