Skip to content

feat: recursively load .lua files under config/lua - #178

Open
mingminglf wants to merge 1 commit into
OpenSteam001:mainfrom
mingminglf:feat/recursive-lua-subdirs
Open

feat: recursively load .lua files under config/lua#178
mingminglf wants to merge 1 commit into
OpenSteam001:mainfrom
mingminglf:feat/recursive-lua-subdirs

Conversation

@mingminglf

Copy link
Copy Markdown

What

Support organizing Lua scripts in subdirectories under the Lua directory, so users can keep one file per game (or any other layout) instead of being forced to flatten everything into the root.

Changes

  • CollectLuaFiles (LuaConfig.cpp) now walks subdirectories recursively (manual stack-based traversal with error_code, so unreadable dirs are skipped safely). Only .lua regular files are collected, everything else unchanged.
  • Watch::IssueRead (DirectoryWatch.cpp): ReadDirectoryChangesW now uses �WatchSubtree=TRUE, so file changes in subdirectories trigger hot reload too.

Behavior preserved

  • Per-file tracking, mtime-based purchase time, manifest override precedence (later-parsed file wins), debounce, and the [lua] paths mechanism are all unchanged.
  • Existing flat files in the Lua dir keep working.

Verification

  • Subdirectory lua files are loaded (depot keys + appids registered at startup).
  • Adding/removing a .lua file inside a subdirectory triggers hot reload without restart (verified in logs: inserted AppId /
    emoved AppId).

- CollectLuaFiles now walks subdirectories of the lua directory so scripts
  can be organized in subfolders (one file per game, etc.)
- Enable bWatchSubtree in DirectoryWatch so file changes in subdirectories
  trigger hot reload
aitronz added a commit to aitronz/OpenSteamTool-exp that referenced this pull request Aug 19, 2026
…nglf)

- CollectLuaFiles now walks subdirectories of the lua directory so scripts can be organized in subfolders (one file per game, etc.)
- Enable bWatchSubtree in DirectoryWatch so file changes in subdirectories trigger hot reload
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant