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:
parent
61e1588a97
commit
a231bcd446
2 changed files with 15 additions and 6 deletions
|
@ -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) {
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue