Simple string sort on listing torrents
This commit is contained in:
@@ -25,8 +25,8 @@ func HandleHeadRequest(directory, torrentName, fileName string, w http.ResponseW
|
||||
return
|
||||
}
|
||||
|
||||
file, _ := torrent.SelectedFiles.Get(fileName)
|
||||
if file == nil {
|
||||
file, ok := torrent.SelectedFiles.Get(fileName)
|
||||
if !ok {
|
||||
log.Warnf("Cannot find file %s from path %s", fileName, req.URL.Path)
|
||||
http.Error(w, "Cannot find file", http.StatusNotFound)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user