Fix issue with config file saving, fix issue with state file saving, fix issue when merging a uuid into a server without one

This commit is contained in:
Matthew Penner
2020-04-10 17:55:36 -06:00
parent 4ea1b90560
commit 1f4aca8210
5 changed files with 12 additions and 47 deletions

View File

@@ -24,7 +24,7 @@ func (s *Server) UpdateDataStructure(data []byte, background bool) error {
// Don't allow obviously corrupted data to pass through into this function. If the UUID
// doesn't match something has gone wrong and the API is attempting to meld this server
// instance into a totally different one, which would be bad.
if src.Uuid != "" && src.Uuid != s.Uuid {
if src.Uuid != "" && s.Uuid != "" && src.Uuid != s.Uuid {
return errors.New("attempting to merge a data stack with an invalid UUID")
}