summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Miika Turkia <miika.turkia@gmail.com>2014-10-13 21:31:01 +0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-10-13 21:35:43 +0200
commit5d1bc11ab75eee9f2f79d2cd40132ec1885ee1a6 (patch)
tree2534fbab1c07b8eb1a579a113b40e590ead77c1a
parent8ae5b816bd343a0cd2d447ac0067d50f8aa4cfbf (diff)
downloadsubsurface-5d1bc11ab75eee9f2f79d2cd40132ec1885ee1a6.tar.gz
Ignore pictures when parsing divelogs.de import
Do not do XML parse on pictures. Currently just ignore them, in the future we might want to save them somewhere and include them in Subsurface logs. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--file.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/file.c b/file.c
index 1859e395f..b1e258b75 100644
--- a/file.c
+++ b/file.c
@@ -89,6 +89,9 @@ static int try_to_open_zip(const char *filename, struct memblock *mem)
struct zip_file *file = zip_fopen_index(zip, index, 0);
if (!file)
break;
+ /* skip parsing the divelogs.de pictures */
+ if (strstr(zip_get_name(zip, index, 0), "pictures/"))
+ continue;
zip_read(file, filename);
zip_fclose(file);
success++;