admin/sync: Removes windows \r in exceptions

This commit is contained in:
nemunaire 2022-10-31 12:15:49 +01:00
parent 56e41cad6a
commit a790ced236

View file

@ -54,7 +54,7 @@ func LoadException(i Importer, th *fic.Theme) (exceptions *CheckExceptions) {
if fexcept, err := GetFileContent(i, filepath.Join(th.Path, "repochecker-ack.txt")); err == nil { if fexcept, err := GetFileContent(i, filepath.Join(th.Path, "repochecker-ack.txt")); err == nil {
exceptions = &CheckExceptions{} exceptions = &CheckExceptions{}
for n, line := range strings.Split(fexcept, "\n") { for n, line := range strings.Split(fexcept, "\n") {
(*exceptions)[line] = fmt.Sprintf("repochecker-ack.txt:%d", n+1) (*exceptions)[strings.TrimSpace(line)] = fmt.Sprintf("repochecker-ack.txt:%d", n+1)
} }
} }