admin: Download file only if file is not present locally

This commit is contained in:
nemunaire 2025-03-29 19:19:29 +01:00
parent fbc84f9d08
commit bc94d0c649

View file

@ -363,7 +363,7 @@ func SyncExerciceFiles(i Importer, exercice *fic.Exercice, exceptions *CheckExce
var f interface{}
if pf, exists := paramsFiles[fname]; exists && pf.URL != "" {
if pf, exists := paramsFiles[fname]; exists && pf.URL != "" && !i.Exists(path.Join(exercice.Path, "files", fname)) {
dest := GetDestinationFilePath(pf.URL, &pf.Filename)
if _, err := os.Stat(dest); !os.IsNotExist(err) {