From 98acabd9d429962643c25285b7cdeed626f8335c Mon Sep 17 00:00:00 2001 From: Felicitas Pojtinger Date: Thu, 2 Dec 2021 23:59:20 +0100 Subject: [PATCH] fix: Make key checker error universal --- cmd/stbak/cmd/archive.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/cmd/stbak/cmd/archive.go b/cmd/stbak/cmd/archive.go index 62c356a..86401c5 100644 --- a/cmd/stbak/cmd/archive.go +++ b/cmd/stbak/cmd/archive.go @@ -53,8 +53,7 @@ var ( errUnknownCompressionLevel = errors.New("unknown compression level") errUnsupportedCompressionLevel = errors.New("unsupported compression level") - errRecipientNotAccessible = errors.New("recipient/public key not found or accessible") - errIdentityNotAccessible = errors.New("identity/private key not found or accessible") + errKeyNotAccessible = errors.New("key not found or accessible") errMissingTarHeader = errors.New("tar header is missing") ) @@ -387,7 +386,7 @@ func checkKeyAccessible(encryptionFormat string, pathToKey string) error { } if _, err := os.Stat(pathToKey); err != nil { - return errRecipientNotAccessible + return errKeyNotAccessible } return nil