Bug fixes

This commit is contained in:
Ben Adrian Sarmiento
2024-06-28 20:18:30 +02:00
parent f8f31b3b67
commit 7cd8c9e5c9
4 changed files with 25 additions and 8 deletions

View File

@@ -27,7 +27,7 @@ func CheckFile(directory, torrentName, fileName string, w http.ResponseWriter, r
}
file, ok := torrent.SelectedFiles.Get(fileName)
if !ok || !file.State.Is("ok_file") {
if !ok || file.State.Is("deleted_file") {
// log.Warnf("Cannot find file %s from path %s", fileName, req.URL.Path)
http.Error(w, "File not found", http.StatusNotFound)
return