Skip to content

Commit

Permalink
fix(cdn): delete rom db item that is no more on nfs (#6567)
Browse files Browse the repository at this point in the history
  • Loading branch information
sguiheux committed Jun 7, 2023
1 parent b1430bc commit d0949da
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions engine/cdn/storage/nfs/nfs.go
Expand Up @@ -10,6 +10,7 @@ import (
"time"

"github.com/go-gorp/gorp"
"github.com/pkg/errors"
"github.com/rockbears/log"
gonfs "github.com/vmware/go-nfs-client/nfs"
"github.com/vmware/go-nfs-client/nfs/rpc"
Expand Down Expand Up @@ -173,6 +174,9 @@ func (n *Buffer) ItemExists(ctx context.Context, m *gorpmapper.Mapper, db gorp.S
}
_, _, err = target.Lookup(path)
if err != nil {
if errors.Is(err, os.ErrNotExist) {
return false, nil
}
return false, sdk.WithStack(err)
}
return true, nil
Expand Down

0 comments on commit d0949da

Please sign in to comment.