mirror of
https://github.com/dutchcoders/transfer.sh.git
synced 2025-01-12 20:00:17 +01:00
Merge pull request #365 from JustAnotherArchivist/disable-download-counter-without-limit
Only increment download counter on files that have a download limit
This commit is contained in:
commit
941ec1fe0f
1 changed files with 1 additions and 1 deletions
|
@ -661,7 +661,7 @@ func (s *Server) CheckMetadata(token, filename string, increaseDownload bool) (M
|
|||
return metadata, errors.New("MaxDownloads expired.")
|
||||
} else if !metadata.MaxDate.IsZero() && time.Now().After(metadata.MaxDate) {
|
||||
return metadata, errors.New("MaxDate expired.")
|
||||
} else if increaseDownload {
|
||||
} else if metadata.MaxDownloads != -1 && increaseDownload {
|
||||
// todo(nl5887): mutex?
|
||||
|
||||
// update number of downloads
|
||||
|
|
Loading…
Reference in a new issue