diff options
| author | SulfurNitride <SulfurNitride@users.noreply.github.com> | 2026-03-28 16:45:21 -0500 |
|---|---|---|
| committer | SulfurNitride <SulfurNitride@users.noreply.github.com> | 2026-03-28 16:45:21 -0500 |
| commit | b48e85b82347f3b8c59a7a3e276c6e5d0c810f10 (patch) | |
| tree | 34ba0b17bd3f0af2895b00ff4f7d241705a9d698 /libs | |
| parent | 77cd2c8fbff973f6c36386d56fc911f3f86cff9b (diff) | |
Add debug logging to game symlink creation
Log each game's prefix path, detected username, and whether the
Documents/My Games directory exists. Also log when scan_and_link_all
skips a game due to missing directories. This will help diagnose
why some games are not getting their Documents folders symlinked
during prefix setup.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'libs')
| -rw-r--r-- | libs/nak/src/installers/symlinks.rs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/libs/nak/src/installers/symlinks.rs b/libs/nak/src/installers/symlinks.rs index aa55752..e8e477b 100644 --- a/libs/nak/src/installers/symlinks.rs +++ b/libs/nak/src/installers/symlinks.rs @@ -54,6 +54,10 @@ pub fn create_game_symlinks(nak_prefix: &Path, games: &[Game]) { for game in games { // Skip games without prefixes let Some(game_prefix) = &game.prefix_path else { + log_info(&format!( + "Symlink skip '{}' (app_id {}): no prefix_path", + game.name, game.app_id + )); continue; }; @@ -62,6 +66,12 @@ pub fn create_game_symlinks(nak_prefix: &Path, games: &[Game]) { let game_username = find_prefix_username(&game_users_dir); let game_user_dir = game_users_dir.join(&game_username); + let my_games_dir = game_user_dir.join("Documents/My Games"); + log_info(&format!( + "Symlink checking '{}' (app_id {}): prefix={}, user='{}', my_games_exists={}", + game.name, game.app_id, game_prefix.display(), game_username, my_games_dir.is_dir() + )); + // Scan and symlink ALL folders in the game prefix's Documents/My Games/ linked_count += scan_and_link_all( &my_games, @@ -214,10 +224,18 @@ fn scan_and_link_all( _game_prefix: &Path, ) -> usize { if !game_base.is_dir() { + log_info(&format!( + " scan_and_link_all: {} not a dir for '{}', skipping", + game_base.display(), game_name + )); return 0; } let Ok(entries) = fs::read_dir(game_base) else { + log_info(&format!( + " scan_and_link_all: cannot read {} for '{}'", + game_base.display(), game_name + )); return 0; }; |
