From 764f5100f08b2be59ecbe474f75ef7922d9291e1 Mon Sep 17 00:00:00 2001 From: reger Date: Fri, 4 Mar 2016 23:05:55 +0100 Subject: [PATCH] fix delete of temp file after odt % ooxml parser Close zipfile after parsing --- source/net/yacy/document/parser/odtParser.java | 4 +++- source/net/yacy/document/parser/ooxmlParser.java | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/source/net/yacy/document/parser/odtParser.java b/source/net/yacy/document/parser/odtParser.java index 03c35e188..68c7e0955 100644 --- a/source/net/yacy/document/parser/odtParser.java +++ b/source/net/yacy/document/parser/odtParser.java @@ -165,6 +165,8 @@ public class odtParser extends AbstractParser implements Parser { } } + zipFile.close(); // close zipfile (so underlaying file (temp file) can be deleted later + // make the languages set final Set languages = new HashSet(1); if (docLanguage != null) languages.add(docLanguage); @@ -197,7 +199,7 @@ public class odtParser extends AbstractParser implements Parser { "", null, descriptions, - 0.0f, 0.0f, + 0.0d, 0.0d, contentBytes, null, null, diff --git a/source/net/yacy/document/parser/ooxmlParser.java b/source/net/yacy/document/parser/ooxmlParser.java index c543ebf01..8de8bf6e1 100644 --- a/source/net/yacy/document/parser/ooxmlParser.java +++ b/source/net/yacy/document/parser/ooxmlParser.java @@ -151,6 +151,8 @@ public class ooxmlParser extends AbstractParser implements Parser { } } + zipFile.close(); // close zipfile (so underlaying file (temp file) can be deleted later + // make the languages set final Set languages = new HashSet(1); if (docLanguage != null && docLanguage.isEmpty())