Skip to content

Commit

Permalink
Don't log if alt client leveldbs are not found
Browse files Browse the repository at this point in the history
  • Loading branch information
cedws committed Oct 15, 2022
1 parent 8918f43 commit 528c6c9
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion client/token/token.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func getSafeStorageTokens(path string) (SafeStorageTokens, error) {
ReadOnly: true,
})
if err != nil {
return nil, fmt.Errorf("tokens: error opening database: %w", err)
return nil, fmt.Errorf("token: error opening database: %w", err)
}
defer db.Close()

Expand Down
6 changes: 4 additions & 2 deletions client/token/token_darwin.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"crypto/cipher"
"crypto/sha1"
"encoding/base64"
"errors"
"fmt"
"os"
"path/filepath"
Expand Down Expand Up @@ -33,8 +34,9 @@ func GetToken() (string, error) {

safeTokens, err := getSafeStorageTokens(path)
if err != nil {
// try another database
log.Error(err)
if !errors.Is(err, os.ErrNotExist) {
log.Error(err)
}
continue
}

Expand Down
6 changes: 4 additions & 2 deletions client/token/token_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"crypto/cipher"
"encoding/base64"
"encoding/json"
"errors"
"fmt"
"os"
"path/filepath"
Expand Down Expand Up @@ -37,8 +38,9 @@ func GetToken() (string, error) {

safeTokens, err := getSafeStorageTokens(path)
if err != nil {
// try another database
log.Error(err)
if !errors.Is(err, os.ErrNotExist) {
log.Error(err)
}
continue
}

Expand Down

0 comments on commit 528c6c9

Please sign in to comment.