lib/config, lib/ignore: Write Windows line endings (fixes #7115) (#8052)

This commit is contained in:
Jakob Borg
2021-11-22 09:38:24 +01:00
committed by GitHub
parent 4b750b6dc3
commit 1754c93370
6 changed files with 92 additions and 3 deletions

View File

@@ -1293,7 +1293,7 @@ func zipFile(out string, files []archiveFile) {
if err != nil {
log.Fatal(err)
}
bs = bytes.Replace(bs, []byte{'\n'}, []byte{'\n', '\r'}, -1)
bs = bytes.Replace(bs, []byte{'\n'}, []byte{'\r', '\n'}, -1)
fh.UncompressedSize = uint32(len(bs))
fh.UncompressedSize64 = uint64(len(bs))