Ensure old device ID remains active on the client if new device ID registration fails

This commit is contained in:
2025-06-01 16:24:47 -04:00
parent 87041a7bb3
commit 4a0e0f8e9e
2 changed files with 22 additions and 9 deletions
+1 -1
View File
@@ -74,7 +74,7 @@ func LibmuttonInit(inputCB func(prompt string) string, clientSpecificIniData [][
return errors.New("unable to initialize libmutton directories: " + err.Error())
}
// write config file
if len(clientSpecificIniData) > 0 { // TODO test passing empty clientSpecificIniData
if len(clientSpecificIniData) > 0 {
err = cfg.WriteConfig(append(clientSpecificIniData, [][3]string{{"LIBMUTTON", "offlineMode", "true"}}...), nil, false)
if err != nil {
return errors.New("unable to write config file: " + err.Error())