libretro / RetroArch

Cross-platform, sophisticated frontend for the libretro API. Licensed GPLv3.
http://www.libretro.com
GNU General Public License v3.0
10.17k stars 1.82k forks source link

Content scanner writes wrong path in playlist if archived file contains accented character #14361

Closed kp8888 closed 1 month ago

kp8888 commented 2 years ago

Description

RetroArch scanner generates a wrong path to an archived file if the file in the archive contains an accented character. For example, the letter é will be replaced with ?, and the rom will not be loaded if launched from the playlist.

Steps to reproduce the bug

  1. Use manual scanner to scan directory containing zip file with a rom that has an accented character in its filename.
  2. Failure when attempting to load rom due to incorrect path in playlist.

In my case, I'm trying to load "Dragon Quest III (Japan) [T-En by DQ Translations v1.1] [Add by Rod Mérida v1.0c] [n].zip" , which contains a rom with the same filename. The playlist scanner writes the rom's path as "Dragon Quest III (Japan) [T-En by DQ Translations v1.1] [Add by Rod Mérida v1.0c] [n].zip#Dragon Quest III (Japan) [T-En by DQ Translations v1.1] [Add by Rod M?rida v1.0c] [n].sfc" into the playlist file.

Loading the rom directly via the content loader works without any issues.

Version/Commit

Environment information

i30817 commented 2 years ago

Seems like this might be because of the zip header reading implementation, not the paths per-se, since the path before the zip has the accent.

Can you load it if you edit the path in the playlist to replace that last '?' by 'é'?

Or if you extract the zip and point the playlist entry to the extracted sfc (still with a 'é')?

gouchi commented 1 month ago

@kp8888 Can you make a test with latest stable ? If you don't reproduce the issue anymore, please close this issue.

I can't reproduce the issue using manual scan it gives this playlist

{
  "version": "1.5",
  "default_core_path": "/home/test/.config/retroarch/cores/bsnes_libretro.so",
  "default_core_name": "Nintendo - SNES / SFC (bsnes)",
  "label_display_mode": 0,
  "right_thumbnail_mode": 0,
  "left_thumbnail_mode": 0,
  "thumbnail_match_mode": 0,
  "sort_mode": 0,
  "scan_content_dir": "/tmp",
  "scan_file_exts": "zip",
  "scan_dat_file_path": "",
  "scan_search_recursively": true,
  "scan_search_archives": false,
  "scan_filter_dat_content": false,
  "scan_overwrite_playlist": false,
  "items": [
    {
      "path": "/tmp/Dragon Quest III (Japan) (MSU1) [T-En by DQ Translations v1.1] [Add by Rod Mérida v1.0c] [Hack by Cubear v1.11] [n].zip",
      "label": "Dragon Quest III (Japan) (MSU1) [T-En by DQ Translations v1.1] [Add by Rod Mérida v1.0c] [Hack by Cubear v1.11] [n]",
      "core_path": "/home/test/.config/retroarch/cores/bsnes_libretro.so",
      "core_name": "Nintendo - SNES / SFC (bsnes)",
      "crc32": "00000000|crc",
      "db_name": "Nintendo - Super Nintendo Entertainment System.lpl"
    }
  ]
}

Thank you.

kp8888 commented 1 month ago

Yep, I can confirm that the problem is no longer there. Thanks for your help everyone.