🐛 Don't mess with EOL style of GCODE files

Fixes issue with lag in progress reporting on files that have CRLF EOLs.

See also https://community.octoprint.org/t/curious-issue-with-print-progress/16304/
This commit is contained in:
Gina Häußge committed 2020-03-23 16:04:33 +01:00
1 parent 05cbe89d87
commit 27bbab9582
1 file changed
+1 -1
+1 -1
View File
@@ -4078,7 +4078,7 @@ class PrintingGcodeFileInformation(PrintingFileInformation):
"""
PrintingFileInformation.start(self)
with self._handle_mutex:
self._handle = bom_aware_open(self._filename, encoding="utf-8", errors="replace")
self._handle = bom_aware_open(self._filename, encoding="utf-8", errors="replace", newline="")
self._pos = self._handle.tell()
if self._handle.encoding.endswith("-sig"):
# Apparently we found an utf-8 bom in the file.