Commit 9e7a76b5 authored by Petri Hintukainen's avatar Petri Hintukainen

Fix caching

Make sure directories exist in cache.
Fixes Gozilla loading animation when played from UDF filesystem
(Xlet checks if directories / files exist).
parent a6911bb4
......@@ -295,7 +295,8 @@ class VFSCache {
String relPath = absPath.substring(vfsRootLength);
String[] names = Libbluray.listBdFiles(relPath, true);
if (names != null) {
/* this is directory */
/* this is directory. Make sure it exists. */
Libbluray.cacheBdRomFile(relPath + "/", cacheRoot + relPath + "/");
return;
}
......
......@@ -454,6 +454,11 @@ int disc_cache_bdrom_file(BD_DISC *p, const char *rel_path, const char *cache_pa
BD_FILE_H *fp_out;
int64_t got;
if (rel_path[strlen(rel_path) - 1] == '/') {
file_mkdirs(cache_path);
return 0;
}
/* input file from BD-ROM */
fp_in = p->pf_file_open_bdrom(p->fs_handle, rel_path);
if (!fp_in) {
......
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