Skip to content

Commit

Permalink
review
Browse files Browse the repository at this point in the history
  • Loading branch information
dunglas committed Nov 19, 2024
1 parent a69bd6f commit ef056c0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion modules/caddyhttp/fileserver/matcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,8 @@ func (m MatchFile) selectFile(r *http.Request) (bool, error) {

candidates := makeCandidates(pattern)
for _, c := range candidates {
if m.TryPolicy == tryPolicyFirstExistFallback && i == maxI {
// Skip the IO if using fallback policy and it's the latest item
if i == maxI {
setPlaceholders(c, false)

return true, nil
Expand Down

0 comments on commit ef056c0

Please sign in to comment.