words += cc.getWords();
story.getChapters().add(cc);
- story.getMeta().setWords(words);
} finally {
if (chapIn != null) {
chapIn.close();
i++;
}
+
+ story.getMeta().setWords(words);
pgChaps.setName("Extracting chapters");
} else {
resume.setName("");
resume.setNumber(1);
story.getChapters().add(resume);
+ story.getMeta().setWords(resume.getWords());
String descChapterName = Instance.getInstance().getTrans()
.getString(StringId.DESCRIPTION);
InputStream in = null;
try {
in = Instance.getInstance().getCache().open(url, getSupport(url), true);
- return new Image(in);
+ Image img = new Image(in);
+ if (img.getSize() == 0) {
+ img.close();
+ throw new IOException(
+ "Empty image not accepted");
+ }
+ return img;
} catch (IOException e) {
} finally {
if (in != null) {