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) { if (plugin == null) {
return null; return null;
} }
if (!plugin.type().Builtin && bookFile != bookFile.getPhysicalFile()) {
return null;
}
try { try {
bookFile = plugin.realBookFile(bookFile); bookFile = plugin.realBookFile(bookFile);
} catch (BookReadingException e) { } catch (BookReadingException e) {

View file

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