Small fixes for epub:
authorNiki Roo <niki@nikiroo.be>
Sat, 15 Jul 2017 07:51:51 +0000 (09:51 +0200)
committerNiki Roo <niki@nikiroo.be>
Sat, 15 Jul 2017 07:51:51 +0000 (09:51 +0200)
- do not force-save the info file outside of it on export (for all format)
- save the info file inside the epub, it was not!

src/be/nikiroo/fanfix/library/BasicLibrary.java
src/be/nikiroo/fanfix/output/Epub.java

index 9ac16ea2a45ba16e058d81f6d950b85e54bc8ea6..de3dbb64890dd53df4bad285c198693e8f061348 100644 (file)
@@ -338,7 +338,7 @@ abstract public class BasicLibrary {
                        pg.addProgress(pgOut, 1);
                }
 
-               BasicOutput out = BasicOutput.getOutput(type, true);
+               BasicOutput out = BasicOutput.getOutput(type, false);
                if (out == null) {
                        throw new IOException("Output type not supported: " + type);
                }
@@ -401,6 +401,7 @@ abstract public class BasicLibrary {
                if (getInfo(luid) != null) {
                        delete(luid);
                }
+               
                doSave(story, pg);
 
                clearCache();
index 89bff66274ee3057125cbfa93169fed836869ee2..869a0bc2647f3e7642ee458faf389684ed48186b 100644 (file)
@@ -46,6 +46,7 @@ class Epub extends BasicOutput {
                File data = new File(tmpDir, "DATA");
                data.mkdir();
                new InfoText().process(story, data, targetNameOrig);
+               InfoCover.writeInfo(data, targetNameOrig, story.getMeta());
                IOUtils.writeSmallFile(data, "version", "3.0");
 
                super.process(story, targetDir, targetNameOrig);