Fix bug
This commit is contained in:
parent
acf0d29040
commit
7f06546931
|
|
@ -106,9 +106,10 @@ public class Local extends Spider {
|
||||||
|
|
||||||
private List<Sub> getSubs(String path) {
|
private List<Sub> getSubs(String path) {
|
||||||
File file = new File(path);
|
File file = new File(path);
|
||||||
if (file.getParentFile() == null) return Collections.emptyList();
|
File[] files = file.getParentFile() == null ? null : file.getParentFile().listFiles();
|
||||||
|
if (files == null || files.length == 0) return Collections.emptyList();
|
||||||
List<Sub> subs = new ArrayList<>();
|
List<Sub> subs = new ArrayList<>();
|
||||||
for (File f : file.getParentFile().listFiles()) {
|
for (File f : files) {
|
||||||
String ext = Util.getExt(f.getName());
|
String ext = Util.getExt(f.getName());
|
||||||
if (Util.isSub(ext)) subs.add(Sub.create().name(Util.removeExt(f.getName())).ext(ext).url("file://" + f.getAbsolutePath()));
|
if (Util.isSub(ext)) subs.add(Sub.create().name(Util.removeExt(f.getName())).ext(ext).url("file://" + f.getAbsolutePath()));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -1 +1 @@
|
||||||
fd1b4ae6ab532b829b3256e786c03e21
|
b65fbd46a646519fea2b594f2faf4138
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue