libretro / libretro/RetroArch

RetroArch adds wrong whitespace/breaks in directory settings

Open
#12,377 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

This bug appeared in Android.
When going to Settings -> Directories and change on of the entries to something like this

"/storage/emulated/0/hos_data/RetroArch Assets/thumbnails"

And save the configuration, RetroArch won't start again afterwards but crashes instead.

I then headed to the config file with ES File Explorer PRO (it has a built in text editor) only to find that it added a white space after hos_data:

"/storage/emulated/0/hos_data /RetroArch Assets/thumbnails"

Since ES doesn't have a search/replace feature I installed a standalone text editor and there it appears that there are line breaks instead:

"/storage/emulated/0/hos_data
/RetroArch Assets/thumbnails"

I don't know what's really there without a PC but I edited all those lines to remove the breaks and then RetroArch starts again.
However it still won't recognize the directories. If I go to load content and start at the downloads folder which I set to "/storage/emulated/0/hos_data/RetroArch Assets/downloads" it won't list the *.gba files I placed there. Instead I found out that if RetroArch writes to one of those directories (like it does for the achievement icons) it - again - does that to /hos_data / (with a whitespace) and I then have two hos_data folders in emulated/0/ (one seems to have the whitespace although ES File Explorer won't let me see the whitespace).

Background info:
I did all this on my Nintendo Switch.
My aim was to access my savegames and other assets from both Instances of RetroArch, that one on Horizon OS and tha one on Switchroot Android.
To achieve that I rooted Switchroot Android with Magisk and used Script Manager to apply a mount script on boot that mounts the Horizon FAT32 partition into that hos_data folder.

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 by reproducing the issue through Settings -> Directories on Android, using a path containing spaces such as the reported /storage/emulated/0/hos_data/RetroArch Assets path. Inspect the generated configuration and verify whether saving preserves the path and whether the configured directories are recognized when loading content. No source file or test is named in the report.

Written by the indexing model from the issue text.

Assessment

Tech stack
android
Domain
mobile-dev, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.