- story.setChapters(new ArrayList<Chapter>());
- Chapter chap = new Chapter(1, null);
- story.getChapters().add(chap);
-
- ZipInputStream zipIn = new ZipInputStream(getInput());
-
- Map<String, BufferedImage> images = new HashMap<String, BufferedImage>();
- for (ZipEntry entry = zipIn.getNextEntry(); entry != null; entry = zipIn
- .getNextEntry()) {
- if (!entry.isDirectory()
- && entry.getName().startsWith(getDataPrefix())) {
- String entryLName = entry.getName().toLowerCase();
- boolean imageEntry = false;
- for (String ext : getImageExt(false)) {
- if (entryLName.endsWith(ext)) {
- imageEntry = true;
+ File tmpDir = Instance.getTempFiles().createTempDir("info-text");
+ String basename = null;
+
+ Map<String, Image> images = new HashMap<String, Image>();
+ try {
+ ZipInputStream zipIn = new ZipInputStream(getInput());
+ for (ZipEntry entry = zipIn.getNextEntry(); entry != null; entry = zipIn
+ .getNextEntry()) {
+ if (!entry.isDirectory()
+ && entry.getName().startsWith(getDataPrefix())) {
+ String entryLName = entry.getName().toLowerCase();
+ boolean imageEntry = false;
+ for (String ext : BasicSupportImages.getImageExt(false)) {
+ if (entryLName.endsWith(ext)) {
+ imageEntry = true;
+ }