1
0
Fork 0
mirror of https://github.com/geometer/FBReaderJ.git synced 2025-10-05 10:49:24 +02:00

external plugins do not support files inside archives

This commit is contained in:
Nikolay Pultsin 2014-03-19 10:23:19 +02:00
parent 61e1588a97
commit a231bcd446
2 changed files with 15 additions and 6 deletions

View file

@ -64,6 +64,9 @@ public class BookCollection extends AbstractBookCollection {
if (plugin == null) {
return null;
}
if (!plugin.type().Builtin && bookFile != bookFile.getPhysicalFile()) {
return null;
}
try {
bookFile = plugin.realBookFile(bookFile);
} catch (BookReadingException e) {

View file

@ -50,12 +50,18 @@ public abstract class FormatPlugin {
public abstract String readAnnotation(ZLFile file);
public enum Type {
ANY,
JAVA,
NATIVE,
PLUGIN,
EXTERNAL,
NONE
ANY(false),
JAVA(true),
NATIVE(true),
PLUGIN(false),
EXTERNAL(false),
NONE(false);
public final boolean Builtin;
Type(boolean builtin) {
Builtin = builtin;
}
};
public abstract Type type();