Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

better use temp dir for checking expanded ePub's (folders) #11

Closed
tofi86 opened this issue Mar 18, 2014 · 2 comments
Closed

better use temp dir for checking expanded ePub's (folders) #11

tofi86 opened this issue Mar 18, 2014 · 2 comments

Comments

@tofi86
Copy link
Collaborator

tofi86 commented Mar 18, 2014

Felix Lieb am 18.03.2014 per Mail:

Beim Überprüfen von entpackten EPUB-Daten erstellt der Checker zunächst ein EPUB mit demselben Namen, wie der Ordner, der die Daten beinhaltet, prüft dieses dann und löscht die EPUB-Datei wieder.

Wenn ich ein EPUB bekomme, um etwas daran zu verändern, entpacke ich es meistens in ein Verzeichnis desselben Namens ohne epub-Endung.

Verwende ich diesen Ordner schließlich mit dem EPUB-Checker, wird meine originale EPUB-Datei überschrieben.

Hier wäre eine Prüfung sinnvoll, ob die Datei schon existiert oder noch besser Arbeiten in einem temporären Verzeichnis

@tofi86 tofi86 changed the title Temp-Verzeichnis für entpackte EPUB-Prüfung better use temp dir for checking expanded ePub's (folders) Mar 21, 2015
@tofi86
Copy link
Collaborator Author

tofi86 commented Dec 5, 2015

Not as easy to implement as it seams.

Currently I'm using the EpubCheck Archive class which takes a folder and zips it up to an EPUB file with the same name:

Archive epub = new Archive(file.getPath(), true);
epub.createArchive();

However, the Archive class doesn't has a method to specify the output path. It just saves the EPUB where the input came from.

This probably has to be fixes in EpubCheck core...

@tofi86
Copy link
Collaborator Author

tofi86 commented Dec 5, 2015

Made a fix and sent a PullRequest to the EpubCheck project: w3c/epubcheck#657

@tofi86 tofi86 self-assigned this Dec 12, 2016
@tofi86 tofi86 added this to the Version 1.7 milestone Dec 12, 2016
@tofi86 tofi86 closed this as completed in f1b5706 Dec 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant