Fix titles which have just a title.tmd and no tmd.[version]

This commit is contained in:
Maschell 2022-02-01 23:48:30 +01:00
parent 623b8a6c9d
commit 385ddb3bdc
1 changed files with 2 additions and 9 deletions

View File

@ -26,17 +26,10 @@ public class FuseContainerWrapper {
public static Map<String, FuseContainer> createFuseContainer(Optional<FuseDirectory> parent, File c) {
System.out.println("Mounting " + c.getAbsolutePath());
Map<String, FuseContainer> result = new HashMap<>();
if (c.exists() && c.isDirectory()) {
File[] tmd = c.listFiles(f -> f.isFile() && f.getName().startsWith("tmd."));
if (tmd != null && tmd.length > 0) {
result.put(prefix + c.getName(), new RemoteLocalBackupNUSTitleContainer(parent, c));
return result;
}
}
if (c.exists() && c.isDirectory()) {
File[] tmd = c.listFiles(f -> f.isFile() && f.getName().equals("title.tmd"));
File[] tmd = c.listFiles(f -> f.isFile() && (f.getName().startsWith("tmd.") || f.getName().startsWith("title.tmd")));
if (tmd != null && tmd.length > 0) {
// In case there is a tmd file