Remove file after checking
This commit is contained in:
parent
e3f7cce80a
commit
6af685088e
|
@ -42,8 +42,14 @@ func treatSubmission(pathname string, team_id string, exercice_id string) {
|
|||
} else if solved {
|
||||
exercice.Solved(team)
|
||||
log.Printf("%s Team %d SOLVED exercice %d\n", id, team.Id, exercice.Id)
|
||||
if err := os.Remove(pathname); err != nil {
|
||||
log.Println(id, "[ERR]", err)
|
||||
}
|
||||
} else {
|
||||
log.Printf("%s Team %d submit an invalid solution for exercice %d\n", id, team.Id, exercice.Id)
|
||||
if err := os.Remove(pathname); err != nil {
|
||||
log.Println(id, "[ERR]", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue