sync: Introduce repochecker-ack.txt to support check exceptions

This commit is contained in:
nemunaire 2022-10-29 17:03:57 +02:00
parent edde9f885d
commit fb368d79d1
17 changed files with 283 additions and 106 deletions

View file

@ -4,10 +4,11 @@ import (
"fmt"
"path"
"srs.epita.fr/fic-server/admin/sync"
"srs.epita.fr/fic-server/libfic"
)
func EPITACheckFile(file *fic.EFile) (errs []error) {
func EPITACheckFile(file *fic.EFile, exceptions *sync.CheckExceptions) (errs []error) {
// Enforce file format
if path.Ext(file.Name) == "rar" || path.Ext(file.Name) == "7z" {
errs = append(errs, fmt.Errorf("this file use a forbidden archive type."))