File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -840,13 +840,16 @@ func syncthingMain(runtimeOptions RuntimeOptions) {
840840
841841 if opts := cfg .Options (); IsCandidate {
842842 l .Infoln ("Anonymous usage reporting is always enabled for candidate releases." )
843- opts .URAccepted = usageReportVersion
844- cfg .SetOptions (opts )
845- cfg .Save ()
846- // Unique ID will be set and config saved below if necessary.
843+ if opts .URAccepted != usageReportVersion {
844+ opts .URAccepted = usageReportVersion
845+ cfg .SetOptions (opts )
846+ cfg .Save ()
847+ // Unique ID will be set and config saved below if necessary.
848+ }
847849 }
848850
849- if opts := cfg .Options (); opts .URUniqueID == "" {
851+ // If we are going to do usage reporting, ensure we have a valid unique ID.
852+ if opts := cfg .Options (); opts .URAccepted > 0 && opts .URUniqueID == "" {
850853 opts .URUniqueID = rand .String (8 )
851854 cfg .SetOptions (opts )
852855 cfg .Save ()
You can’t perform that action at this time.
0 commit comments