mirror of
https://github.com/Thealexbarney/LibHac.git
synced 2024-11-14 10:49:41 +01:00
Work around DiscUtil's quirks
This commit is contained in:
parent
d157619ad5
commit
85a3b56902
2 changed files with 4 additions and 3 deletions
|
@ -35,8 +35,8 @@ namespace LibHac.Nand
|
|||
|
||||
if (!CanReturnEntry(isDir, Mode)) continue;
|
||||
|
||||
DirectoryEntryType type = isDir ? DirectoryEntryType.File : DirectoryEntryType.Directory;
|
||||
long length = isDir ? 0 : ((DiscFileInfo)entry).Length;
|
||||
DirectoryEntryType type = isDir ? DirectoryEntryType.Directory : DirectoryEntryType.File;
|
||||
long length = isDir ? 0 : entry.FileSystem.GetFileLength(entry.FullName);
|
||||
|
||||
yield return new DirectoryEntry(entry.Name, FullPath + '/' + entry.Name, type, length)
|
||||
{
|
||||
|
|
|
@ -18,7 +18,7 @@ namespace NandReader
|
|||
Console.WriteLine("Usage: NandReader raw_nand_dump_file");
|
||||
return;
|
||||
}
|
||||
GetTitleKeys(args[0]);
|
||||
ReadSwitchFs(args[0]);
|
||||
}
|
||||
|
||||
private static void GetTitleKeys(string nandFile)
|
||||
|
@ -51,6 +51,7 @@ namespace NandReader
|
|||
var nand = new Nand(stream, keyset);
|
||||
FatFileSystemProvider user = nand.OpenSystemPartition();
|
||||
SwitchFs sdfs = SwitchFs.OpenNandPartition(keyset, user);
|
||||
;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue