sync: Allow exercice directory to do not have identifier
This commit is contained in:
parent
6fd1856dd9
commit
edbb867f62
@ -102,9 +102,12 @@ func BuildExercice(i Importer, theme *fic.Theme, epath string, dmap *map[int64]*
|
||||
var err error
|
||||
eid, e.Title, err = parseExerciceDirname(edir)
|
||||
if err != nil {
|
||||
// Ignore eid if we are certain this is an exercice directory, eid will be 0
|
||||
if !i.Exists(path.Join(epath, "title.txt")) {
|
||||
errs = append(errs, NewExerciceError(e, fmt.Errorf("unable to parse exercice directory: %w", err), theme))
|
||||
return nil, p, eid, edir, errs
|
||||
}
|
||||
}
|
||||
|
||||
// Get exceptions
|
||||
exceptions = LoadExerciceException(i, theme, e, exceptions)
|
||||
|
Loading…
x
Reference in New Issue
Block a user