From 903702c7190d80ee864829ce91a57c68366b852f Mon Sep 17 00:00:00 2001 From: ycc Date: Sun, 31 Mar 2024 15:52:50 +0200 Subject: [PATCH] Fix server public key assignment and rename Wipe() to WipeFolder() --- client/helpers/invitationCheckHelper.go | 3 +++ client/identity.go | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/client/helpers/invitationCheckHelper.go b/client/helpers/invitationCheckHelper.go index 934e6c9..5184d79 100644 --- a/client/helpers/invitationCheckHelper.go +++ b/client/helpers/invitationCheckHelper.go @@ -82,6 +82,9 @@ func InvitationGetMessage(invitationUrl string, serverPublicKey string, invitati return nil, "InvitationGetMessage: StoreServer", err } } else { + if dbsrv.PublicKey != serverPublicKey { + dbsrv.PublicKey = serverPublicKey + } srv = *dbsrv } // buildserver message diff --git a/client/identity.go b/client/identity.go index 3f3a8e4..56ed919 100644 --- a/client/identity.go +++ b/client/identity.go @@ -58,7 +58,7 @@ func (id *Identity) CreateFolder() error { return nil } -func (id *Identity) Wipe() error { +func (id *Identity) WipeFolder() error { err := os.RemoveAll(filepath.Join(GetConfig().StoragePath, id.Uuid)) if err != nil { return err