fix: say when retroarch.cfg cannot be read

This commit is contained in:
Abdessamad Derraz committed 2026-11-05 11:45:53 +01:00
1 parent 2a243985c0
commit 0c384e0446
5 files changed
+47 -12

No files matched your search

+5 -2
View File
@@ -1246,11 +1246,14 @@ def _retroarch_cfg_dir(
A value left empty or at `default` is the directory RetroArch falls back
on, `default` under app_dir. None when the config is unreadable or does
not set the key.
not set the key. A config this user cannot read is said once, like a
closed folder: a retroarch.cfg a `sudo retroarch` left to root hid the
setup without a word.
"""
try:
lines = cfg_path.read_text(encoding="utf-8", errors="replace").splitlines()
except OSError:
except OSError as exc:
_note_refused(cfg_path, exc)
return None
for line in lines:
line = line.strip()