feat: add file exists check

This commit is contained in:
2026-02-19 16:01:56 +01:00
parent 80e2d868d2
commit ecc4564ff7
2 changed files with 24 additions and 0 deletions

View File

@@ -69,6 +69,16 @@ func (app *App) Download(url string, outputFile string, serviceString string, qu
return err
}
fileExists, err := FileExists(outputFile)
if err != nil {
return err
}
if fileExists {
app.log("File " + outputFile + " already exists")
return nil
}
err = app.DownloadFromUrl(downloadUrl, outputFile)
if err != nil {
return err