[PATCH] Enable opening files with .zip suffix
subsurface at henrik.synth.no
subsurface at henrik.synth.no
Tue Sep 17 11:23:54 UTC 2013
From: Henrik Brautaset Aronsen <subsurface at henrik.synth.no>
The test file dives/TestDiveDivingLog5.08allmetric.zip wouldn't load.
Signed-off-by: Henrik Brautaset Aronsen <subsurface at henrik.synth.no>
---
file.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/file.c b/file.c
index 14607ba..70eb79a 100644
--- a/file.c
+++ b/file.c
@@ -225,12 +225,8 @@ static int try_to_open_csv(const char *filename, struct memblock *mem, enum csv_
static int open_by_filename(const char *filename, const char *fmt, struct memblock *mem, char **error)
{
- /* Suunto Dive Manager files: SDE */
- if (!strcasecmp(fmt, "SDE"))
- return try_to_open_zip(filename, mem, error);
-
- /* divelogs.de files: DLD */
- if (!strcasecmp(fmt, "DLD"))
+ /* Suunto Dive Manager files: SDE, ZIP; divelogs.de files: DLD */
+ if (!strcasecmp(fmt, "SDE") || !strcasecmp(fmt, "ZIP") || !strcasecmp(fmt, "DLD"))
return try_to_open_zip(filename, mem, error);
#if ONCE_COCHRAN_IS_SUPPORTED
--
1.8.3.3
More information about the subsurface
mailing list