Skip to content

Commit

Permalink
Check for squirrel.ErrNotFound from cachedMetaInfo
Browse files Browse the repository at this point in the history
  • Loading branch information
anacrolix committed Sep 15, 2023
1 parent 412eb0f commit 2cb6ceb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion confluence/middlewares.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package confluence
import (
"errors"
"fmt"
"github.com/anacrolix/squirrel"
"io"
"io/fs"
"log"
Expand Down Expand Up @@ -160,7 +161,7 @@ func (h *Handler) cachedMetaInfo(infoHash metainfo.Hash) (*metainfo.MetaInfo, er
}
return os.Open(filepath.FromSlash(p))
}()
if errors.Is(err, fs.ErrNotExist) {
if errors.Is(err, fs.ErrNotExist) || errors.Is(err, squirrel.ErrNotFound) {
return nil, nil
}
if err != nil {
Expand Down

0 comments on commit 2cb6ceb

Please sign in to comment.