fix error while sync new save

This commit is contained in:
2025-08-08 21:30:58 +02:00
parent 23e46e5eef
commit 23ffa93615
3 changed files with 21 additions and 34 deletions

View File

@@ -23,6 +23,7 @@ type (
var (
ErrBackupNotExists error = errors.New("backup not found")
ErrNotExists error = errors.New("not found")
// singleton
hashCacheMu sync.RWMutex
@@ -175,6 +176,9 @@ func Hash(gameID, documentRoot string) (string, error) {
sdir, err := os.Stat(path)
if err != nil {
if errors.Is(err, os.ErrNotExist) {
return "", ErrNotExists
}
return "", err
}