mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-13 05:23:51 -06:00
fix: hide host paths in probe logs and errors
MAME logs the folder above the content's ("Parent path"), which no
place named, and a pack probe kept core_probe's traceback with the
checkout spelled out. The first is written <content>/.., the second
<repo>, <dest> and <work>, replaced before the error is cut.
This commit is contained in:
1 parent
0b36d77071
commit
9d37c46bb3
3 files changed
+29
-2
No files matched your search
@@ -965,7 +965,11 @@ def run_once(args: argparse.Namespace, system_dir: Path, scratch: Path, state_ou
|
||||
result["exit"] = exit_description(proc.returncode)
|
||||
places = [(str(system_dir.resolve()), "<system>"), (str(save_dir.resolve()), "<save>")]
|
||||
if args.content:
|
||||
places.append((str(Path(args.content).resolve().parent), "<content>"))
|
||||
folder = Path(args.content).resolve().parent
|
||||
# MAME prints the folder above the content's too ("Parent path").
|
||||
places.append((str(folder), "<content>"))
|
||||
if folder.parent != folder.parent.parent:
|
||||
places.append((str(folder.parent), "<content>/.."))
|
||||
places.append((str(ROOT), "<repo>"))
|
||||
for line in result.get("logs", []):
|
||||
line["text"] = host_paths_hidden(line["text"], places)
|
||||
|
||||
Reference in new issue
Block a user