Merge branch 'main' into file-share

# Conflicts:
#	client/ios/NetBirdSDK/client.go
This commit is contained in:
Zoltán Papp
2026-09-01 18:06:26 +02:00
485 changed files with 36221 additions and 5501 deletions
+7 -1
View File
@@ -105,8 +105,14 @@ func WriteProfileEmail(configPath string, email string) error {
return fmt.Errorf("resolve profile account path: %w", err)
}
// DirectWriteJson, not the atomic writers: those create a temp file and
// rename it over the target, which the tvOS App Group sandbox blocks. It is
// the same reason the config next to this file goes through
// DirectWriteOutConfig. The file is rewritten whole from one key, so losing
// atomicity costs nothing beyond a torn write on a crash mid-write, which
// reads back as "no email" and is recovered by the next login.
state := profilemanager.ProfileState{Email: email}
if err := util.WriteJsonWithRestrictedPermission(context.Background(), accountPath, state); err != nil {
if err := util.DirectWriteJson(context.Background(), accountPath, state); err != nil {
return fmt.Errorf("write profile account: %w", err)
}