From f2b2d7e62e7f2f81a284af0f76e2f93c6f7105ea Mon Sep 17 00:00:00 2001 From: Ben Sarmiento Date: Sun, 3 Dec 2023 00:14:40 +0100 Subject: [PATCH] Skip internal paths --- internal/torrent/manager.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/internal/torrent/manager.go b/internal/torrent/manager.go index b68907a..c9e11a3 100644 --- a/internal/torrent/manager.go +++ b/internal/torrent/manager.go @@ -867,11 +867,16 @@ func (t *TorrentManager) UpdateTorrentResponseCache(torrent *Torrent) []string { updatedPaths := []string{} dav, html := t.buildTorrentResponses(torrent) t.AssignedDirectoryCb(torrent, func(directory string) { + if strings.HasPrefix(directory, "int__") { + return + } + torrents, _ := t.DirectoryMap.Get(directory) torrents.Set(torrent.AccessKey, torrent) + + // torrent responses pathKey := fmt.Sprintf("%s/%s", directory, torrent.AccessKey) updatedPaths = append(updatedPaths, pathKey) - // torrent responses newHtml := strings.ReplaceAll(html, "$dir", directory) t.ResponseCache.Set(pathKey+".html", newHtml, 1) newDav := strings.ReplaceAll(dav, "$dir", directory)