[PATCH] Test if .bak file is supported database dive log
Miika Turkia
miika.turkia at gmail.com
Wed Mar 6 20:18:42 PST 2013
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 at gmail.com>
---
file.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/file.c b/file.c
index d436e8e..eef779e 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;
--
1.7.9.5
More information about the subsurface
mailing list