#3577 closed Bug (No Bug)
_FileWriteToLine strips @crlf off last line for some files
| Reported by: | BrianM | Owned by: | |
|---|---|---|---|
| Milestone: | Component: | AutoIt | |
| Version: | 3.3.14.1 | Severity: | None |
| Keywords: | _FileWriteToLine | Cc: |
Description
compared the .log to the .log_after files and notice the fail case has the last @crlf removed.
#include <File.au3>
Local $sSourceLine = "227487744 148299776 11.1.6749897"
Local $sTargetFilename = "fail.log"
Local $sFilenameTmp = $sTargetFilename & "_after"
FileCopy($sTargetFilename,$sFilenameTmp,$FC_OVERWRITE)
_FileWriteToLine($sFilenameTmp,2,$sSourceLine)
Local $sTargetFilename = "pass.log"
Local $sFilenameTmp = $sTargetFilename & "_after"
FileCopy($sTargetFilename,$sFilenameTmp,$FC_OVERWRITE)
_FileWriteToLine($sFilenameTmp,2,$sSourceLine)
Attachments (2)
Change History (4)
comment:1 by , on Dec 14, 2017 at 9:48:20 PM
The way the function is written, it's going to strip the last CRLF off of any file. The reason that pass.log works is because there's only 2 lines in it and you're adding the line at the second line. I'm not sure if it's a bug or a design decision.
comment:2 by , on Jan 29, 2018 at 3:08:04 PM
| Resolution: | → No Bug |
|---|---|
| Status: | new → closed |
Design decision

failing case