summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Miika Turkia <miika.turkia@gmail.com>2013-03-07 06:18:42 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-03-07 10:27:31 -0800
commit3e27e494157a3d253cab3572b24a495a90265977 (patch)
tree292d9c56ba8f71b2a17899a42b5ccc3548b0fc11
parenta9cc7f9b10017d2fe3d95bf19d1e9c2389631ef9 (diff)
downloadsubsurface-3e27e494157a3d253cab3572b24a495a90265977.tar.gz
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>
-rw-r--r--file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/file.c b/file.c
index d436e8e2d..eef779e94 100644
--- a/file.c
+++ b/file.c
@@ -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;