Skip to content

Commit

Permalink
Ignore anonymous userdata folder
Browse files Browse the repository at this point in the history
  • Loading branch information
DareFox authored and boppreh committed Sep 2, 2022
1 parent 5c739e9 commit 36f069e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions users.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@ func GetUsers(installationDir string) ([]User, error) {
userID := userDir.Name()
userDir := filepath.Join(userdataDir, userID)

// Ignore anonymous userdata folder because it's only used for CLI downloads
// and it doesn't have required localconfig.vdf fields
userDirName := filepath.Base(userDir)
if (userDirName == "anonymous") {
continue
}

configFile := filepath.Join(userDir, "config", "localconfig.vdf")
// Malformed user directory. Without the localconfig file we can't get
// the username and the game list, so we skip it.
Expand Down

0 comments on commit 36f069e

Please sign in to comment.