This commit is contained in:
Ben Sarmiento
2023-10-24 04:53:26 +02:00
parent 21cbb16b88
commit 03db4b0c00
4 changed files with 5 additions and 31 deletions

View File

@@ -38,7 +38,7 @@ func HandleGetRequest(w http.ResponseWriter, r *http.Request, t *torrent.Torrent
torrentName := segments[len(segments)-2]
filename := segments[len(segments)-1]
torrents := findAllTorrentsWithName(t, baseDirectory, torrentName)
torrents := t.FindAllTorrentsWithName(baseDirectory, torrentName)
if torrents == nil {
log.Println("Cannot find torrent", torrentName)
http.Error(w, "Cannot find file", http.StatusNotFound)