libretro / libretro/RetroArch

"Filter unknown extensions" not honored inside archives

Open
#17,148 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
14.1k
Forks
2.2k
Avg merge
7h 35m
Merged PRs (30d)
51

Description

Description

The "Filter unknown extensions" setting is only honored in ordinary directories, not inside archives.

Expected behavior

When opening a zip file containing a file that is not compatible with any installed core, if "Filter unknown extensions" is off, I expect the file to be visible.

Actual behavior

The file is not visible, usually resulting in a zip that appears empty.

Steps to reproduce the bug
  1. Disable "Filter unknown extensions"
  2. Create a file with a ".a26" extension
  3. Place the file in a normal directory, and also inside a ZIP
  4. Ensure you do not have an Atari 2600 core installed
  5. Using "Load Content", navigate to the directory on disk
  6. The file appears
  7. Now navigate to the ZIP file
  8. The file does not appear
  9. Install the "Stella" core and repeat above steps
  10. The file is now visible in both the directory and ZIP
Bisect Results

I'm afraid I don't know how to use bisect.

Version/Commit
  • RetroArch: 1.19.1 (cloned from github an hour ago)
Environment information
  • OS: Windows 11 x64
  • Compiler: MSYS2 / MINGW64
Fix

This seems to be due to a missing check in menu_displaylist.c. I've added checks against filter_exts during calls to the file_archive_ methods, and in local tests it appears to fix the issue. I will submit and link a PR momentarily.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in menu_displaylist.c and inspect the file_archive_ methods used when browsing ZIP contents, comparing them with ordinary-directory filtering. Reproduce with a .a26 file, Filter unknown extensions disabled, and no Stella core installed. Done means the unknown file is visible inside the ZIP as it is in a normal directory.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.