[client] Fix profile config directory permissions (#5457)

* fix user profile dir perm

* fix fileExists

* revert return var change

* fix anti-pattern
This commit is contained in:
Jeremie Deray
2026-03-03 13:48:51 +01:00
committed by GitHub
parent 403babd433
commit 01ceedac89
3 changed files with 46 additions and 11 deletions

View File

@@ -20,7 +20,11 @@ func (pm *ProfileManager) GetProfileState(profileName string) (*ProfileState, er
}
stateFile := filepath.Join(configDir, profileName+".state.json")
if !fileExists(stateFile) {
stateFileExists, err := fileExists(stateFile)
if err != nil {
return nil, fmt.Errorf("failed to check if profile state file exists: %w", err)
}
if !stateFileExists {
return nil, errors.New("profile state file does not exist")
}