Skip to content

Commit

Permalink
feat: hex encode db name
Browse files Browse the repository at this point in the history
Signed-off-by: Brian McGee <[email protected]>
  • Loading branch information
brianmcgee committed Jan 2, 2024
1 parent 1019851 commit 26c2ae1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/cache/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package cache
import (
"context"
"crypto/sha1"
"encoding/base32"
"encoding/hex"
"errors"
"fmt"
"io/fs"
Expand Down Expand Up @@ -39,7 +39,7 @@ func Open(treeRoot string, clean bool) (err error) {
h.Write([]byte(treeRoot))
digest := h.Sum(nil)

name := base32.StdEncoding.EncodeToString(digest)
name := hex.EncodeToString(digest)
path, err := xdg.CacheFile(fmt.Sprintf("treefmt/eval-cache/%v.db", name))
if err != nil {
return fmt.Errorf("%w: could not resolve local path for the cache", err)
Expand Down

0 comments on commit 26c2ae1

Please sign in to comment.