Skip to content

Commit a5aface

Browse files
authored
updated download count without limit (#1108)
1 parent 4cc58e8 commit a5aface

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

backend/http/public.go

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,9 @@ func publicRawHandler(w http.ResponseWriter, r *http.Request, d *requestContext)
3232
if d.share.DownloadsLimit > 0 && d.share.Downloads >= d.share.DownloadsLimit {
3333
return http.StatusForbidden, fmt.Errorf("share downloads limit reached")
3434
}
35-
if d.share.DownloadsLimit > 0 {
36-
d.share.Mu.Lock()
37-
d.share.Downloads++
38-
d.share.Mu.Unlock()
39-
}
35+
d.share.Mu.Lock()
36+
d.share.Downloads++
37+
d.share.Mu.Unlock()
4038
encodedFiles := r.URL.Query().Get("files")
4139

4240
// Decode the URL-encoded path

0 commit comments

Comments
 (0)