Commit 4c987267 authored by Petri Hintukainen's avatar Petri Hintukainen

Fix caching JAR/ subdirectory from UDF filesystem

parent 730bbcc3
......@@ -159,20 +159,29 @@ class VFSCache {
logger.info("cached " + relPath);
}
private void copyJarDir(String name) {
/* copy directory from BDMV/JAR/ */
private void copyJarDir(String name, String[] files) {
File[] files = new File(vfsRoot + jarDir + name).listFiles();
for (int i = 0; i < files.length; i++) {
File file = files[i];
String relPath = name + File.separator + files[i].getName();
if (file.isDirectory()) {
copyJarDir(relPath);
String relPath = name + File.separator + files[i];
String[] subFiles = Libbluray.listBdFiles(relPath, true);
if (subFiles != null) {
copyJarDir(relPath, subFiles);
} else {
copyJarFile(relPath);
Libbluray.cacheBdRomFile(relPath, cacheRoot + relPath);
}
}
logger.info("cached " + name);
}
private void copyJarDir(String name) {
/* copy directory from BDMV/JAR/ */
String relPath = jarDir + name;
String[] files = Libbluray.listBdFiles(relPath, true);
if (files == null) {
return;
}
copyJarDir(relPath, files);
logger.info("cached " + relPath);
}
/*
......@@ -281,7 +290,7 @@ class VFSCache {
}
String relPath = absPath.substring(vfsRootLength);
String[] names = org.videolan.Libbluray.listBdFiles(relPath, true);
String[] names = Libbluray.listBdFiles(relPath, true);
if (names != null) {
/* this is directory */
return;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment