libretro / libretro/RetroArch

info: Write core_info.cache to user cache directory

Open
#12,669 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug: minor platform: flatpak platform: linux platform: vita
Dominant language
C
Stars
14.1k
Forks
2.2k
Avg merge
7h 35m
Merged PRs (30d)
51

Description

Description

In some distributions of RetroArch, the assets and info file directories is unwrittable. The Ubuntu PPAs, and Flatpak, for instance, distribute the files so that they are not inadvertently changed. Flatpak distributes /app/share/libretro/info/, and makes it unwritable.

When running RetroArch, the .info cache file attempts to get saved to libretro/info/core_info.cache, and fails, because the directory was distributed, and meant to be unwritable.

[ERROR] [Core Info] Failed to write to core info cache file: /app/share/libretro/info/core_info.cache

Would be great to have the cache info file written to a user's cache directory, like ~/.config/retroarch/cache or something.

Expected behavior

Have the core_info.cache file written to a user-space directory, like ~/.config/retroarch/cache/core_info.cache instead.

Actual behavior

It's currently writing to /app/share/libretro/info/core_info.cache, which ends up failing to write.

Steps to reproduce the bug
  1. Make your info directory unwritable
  2. Run RetroArch
  3. See the note in the logs for [ERROR] [Core info] Failed to write core_info.cache
Bisect Results

https://github.com/libretro/RetroArch/pull/12397

Version/Commit

You can find this information under Information/System Information

Environment information
  • OS: Ubuntu 20.04
  • Compiler: gcc/Flatpak

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 from the core_info.cache write that produces the reported [ERROR] [Core Info] message, using the bisect result in pull request 12397 as context. Confirm the cache is written under the user's cache directory, such as ~/.config/retroarch/cache/core_info.cache, and that an unwritable /app/share/libretro/info/ no longer causes the failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
desktop
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.