TASEmulators / TASEmulators/BizHawk

[Linux] Lua Sessions saved with symlinks in script paths are expanded to broken absolute paths

Open
#4,619 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Repro: Affects 2.11 Repro: Could not reproduce Tool: Lua Console
Dominant language
C#
Stars
2.8k
Forks
468
PR merge metrics
No merged PRs in 30d

Description

Summary

Lua Sessions that are saved with scripts that use paths that include symbolic links have their links expanded incorrectly, creating broken paths to the scripts in the session.

EG: /path/to/folder/symlink/script.lua -> /path/to/folder/path/to/symlinked/folder/script.lua, which is an invalid path.

Repro
  1. Create a symbolic link to a folder or file. EG: ln -s ~/path/to/folder /opt/bizhawk/Lua/symlinked_folder
  2. Create a Lua session by loading one or more scripts within the path /opt/bizhawk/Lua/symlinked_folder
  3. Save the Lua session, and close Bizhawk
  4. Reopen Bizhawk, then open the saved Lua session. Note the paths of the scripts in the Lua session are now incorrectly expanded.
Host env.
  • BizHawk 2.11; CachyOS (rolling release, based on Arch); AMD/AMD

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

No files or tests are named. Start by tracing the Lua session save and load handling from the reproduction steps, then compare the stored script paths with the paths originally loaded through the symbolic link. Done means reopening a saved session preserves valid script paths instead of expanding them into broken absolute paths.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.