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