From 8a3833c32b7bb6bfd3e30ba0fd3af7d589d8e98a Mon Sep 17 00:00:00 2001
From: Jono Wenger <jono@elixxir.io>
Date: Tue, 1 Nov 2022 11:42:00 -0700
Subject: [PATCH] Fix error

---
 fileTransfer/store/received.go | 4 ++--
 fileTransfer/store/sent.go     | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/fileTransfer/store/received.go b/fileTransfer/store/received.go
index 189025a71..fd715a76e 100644
--- a/fileTransfer/store/received.go
+++ b/fileTransfer/store/received.go
@@ -30,7 +30,7 @@ const (
 	errLoadReceived            = "error loading received transfer list from storage: %+v"
 	errUnmarshalReceived       = "could not unmarshal received transfer list: %+v"
 	warnLoadReceivedTransfer   = "[FT] failed to load received transfer %d of %d with ID %s: %+v"
-	errLoadAllReceivedTransfer = "failed to load all %d transfers"
+	errLoadAllReceivedTransfer = "failed to load all %d received transfers"
 
 	// Received.AddTransfer
 	errAddExistingReceivedTransfer = "received transfer with ID %s already exists in map."
@@ -83,7 +83,7 @@ func NewOrLoadReceived(kv *versioned.KV) (*Received, []*ReceivedTransfer, error)
 	}
 
 	// Return an error if all transfers failed to load
-	if errCount == len(tidList) {
+	if len(tidList) > 0 && errCount == len(tidList) {
 		return nil, nil, errors.Errorf(errLoadAllReceivedTransfer, len(tidList))
 	}
 
diff --git a/fileTransfer/store/sent.go b/fileTransfer/store/sent.go
index 1c4798b48..fe94412a7 100644
--- a/fileTransfer/store/sent.go
+++ b/fileTransfer/store/sent.go
@@ -31,7 +31,7 @@ const (
 	errLoadSent            = "error loading sent transfer list from storage: %+v"
 	errUnmarshalSent       = "could not unmarshal sent transfer list: %+v"
 	warnLoadSentTransfer   = "[FT] Failed to load sent transfer %d of %d with ID %s: %+v"
-	errLoadAllSentTransfer = "failed to load all %d transfers"
+	errLoadAllSentTransfer = "failed to load all %d sent transfers"
 
 	// Sent.AddTransfer
 	errAddExistingSentTransfer = "sent transfer with ID %s already exists in map."
-- 
GitLab