🐛 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:
1 parent
05cbe89d87
commit
27bbab9582
1 file changed
+1
-1
@@ -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.
|
||||
|
||||
Reference in new issue
Block a user