Skip to content

Commit 36f069e

Browse files
DareFoxboppreh
authored andcommitted
Ignore anonymous userdata folder
1 parent 5c739e9 commit 36f069e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

users.go

+7
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,13 @@ func GetUsers(installationDir string) ([]User, error) {
3939
userID := userDir.Name()
4040
userDir := filepath.Join(userdataDir, userID)
4141

42+
// Ignore anonymous userdata folder because it's only used for CLI downloads
43+
// and it doesn't have required localconfig.vdf fields
44+
userDirName := filepath.Base(userDir)
45+
if (userDirName == "anonymous") {
46+
continue
47+
}
48+
4249
configFile := filepath.Join(userDir, "config", "localconfig.vdf")
4350
// Malformed user directory. Without the localconfig file we can't get
4451
// the username and the game list, so we skip it.

0 commit comments

Comments
 (0)