Skip to content

[BUG] ctrtool stops extracting files from romfs after encountering an empty file #168

Description

@Bednariusz

I was trying to extract the romfs directory of Pokemon Omega Ruby using ctrtool --romfsdir=romfs filename.3ds and I found that there's a file (specifically "a\0\8\7") with the specified length of 0x00 bytes and data offset the same as for the next file.

ctrtool saves all files correctly until it encounters that empty file. It then returns [tc::io::VirtualFileSystem::openFile() ERROR] File does not exist. and stops parsing the rest causing only files up to the "a\0\8\7" being extracted. The --listromfs parameter works correctly and lists all of the files.

Image

I also tried extracting it with Citra and it did everything correctly, including the empty file, so I'm pretty sure it's a bug.

Here's a WinMerge comparison of the directory extracted by ctrtool vs the proper one (red = files not saved by ctrtool) Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions