Test if .bak file is supported database dive log

Even though the documentation states to rename DM4 backup to .db file
extension, accept the default .bak extension as well. This, however,
does not enable the .bak extension in file selection dialog (so .bak
files must be given as command line parameters).

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Miika Turkia 2013-03-07 06:18:42 +02:00 committed by Dirk Hohndel
parent a9cc7f9b10
commit 3e27e49415

2
file.c
View file

@ -297,7 +297,7 @@ void parse_file(const char *filename, GError **error, gboolean possible_default_
#ifdef SQLITE3
fmt = strrchr(filename, '.');
if (fmt && !strcasecmp(fmt + 1, "DB")) {
if (fmt && (!strcasecmp(fmt + 1, "DB") || !strcasecmp(fmt + 1, "BAK"))) {
if (!try_to_open_db(filename, &mem, error)) {
free(mem.buffer);
return;