git://git.nikiroo.be
/
nikiroo-utils.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
use a .summary file
[nikiroo-utils.git]
/
src
/
be
/
nikiroo
/
fanfix
/
supported
/
Cbz.java
diff --git
a/src/be/nikiroo/fanfix/supported/Cbz.java
b/src/be/nikiroo/fanfix/supported/Cbz.java
index cf6033523a05cbb509ebab2052c2d285cfdffd4d..a5391d07575e9f6102ab531e4a756c1be718f711 100644
(file)
--- a/
src/be/nikiroo/fanfix/supported/Cbz.java
+++ b/
src/be/nikiroo/fanfix/supported/Cbz.java
@@
-73,8
+73,6
@@
class Cbz extends Epub {
pgMeta.done(); // 10%
pgMeta.done(); // 10%
- pg.setName(meta.getTitle());
-
File tmpDir = Instance.getInstance().getTempFiles().createTempDir("info-text");
String basename = null;
File tmpDir = Instance.getInstance().getTempFiles().createTempDir("info-text");
String basename = null;
@@
-99,7
+97,13
@@
class Cbz extends Epub {
if (imageEntry) {
String uuid = meta.getUuid() + "_" + entry.getName();
try {
if (imageEntry) {
String uuid = meta.getUuid() + "_" + entry.getName();
try {
- images.put(uuid, new Image(zipIn));
+ Image img = new Image(zipIn);
+ if (img.getSize() == 0) {
+ img.close();
+ throw new IOException(
+ "Empty image not accepted");
+ }
+ images.put(uuid, img);
} catch (Exception e) {
Instance.getInstance().getTraceHandler().error(e);
}
} catch (Exception e) {
Instance.getInstance().getTraceHandler().error(e);
}
@@
-170,7
+174,7
@@
class Cbz extends Epub {
}
if (!imagesList.isEmpty()) {
}
if (!imagesList.isEmpty()) {
- Chapter chap = new Chapter(story.getChapters().size() + 1,
null
);
+ Chapter chap = new Chapter(story.getChapters().size() + 1,
""
);
story.getChapters().add(chap);
for (String uuid : imagesList) {
story.getChapters().add(chap);
for (String uuid : imagesList) {
@@
-197,9
+201,7
@@
class Cbz extends Epub {
}
}
}
}
- pg.setName(meta.getTitle());
pg.done();
pg.done();
-
return story;
}
return story;
}