From 01d51c9fbaf5868feae01cf0d18de17e8186437e Mon Sep 17 00:00:00 2001 From: Alessandro-Salerno Date: Thu, 17 Oct 2024 10:22:46 +0200 Subject: [PATCH] htmc-cgi-ws fix --- cgi-ws/cgi-ws.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/cgi-ws/cgi-ws.go b/cgi-ws/cgi-ws.go index 53a0519..cc50810 100644 --- a/cgi-ws/cgi-ws.go +++ b/cgi-ws/cgi-ws.go @@ -34,6 +34,15 @@ import ( ) func download(filepath string, url string) { + if (exists(filepath)) { + fmt.Print("Ignoring downlaod of <") + fmt.Print(url) + fmt.Print("> because ") + fmt.Print(filepath) + fmt.Println(" already exists") + return + } + fmt.Print("Downloading <") fmt.Print(url) fmt.Print("> to ")