Modify

Opened 6 years ago

Closed 6 years ago

#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)

fail.log (427 bytes) - added by BrianM 6 years ago.
failing case
pass.log (83 bytes) - added by BrianM 6 years ago.
passing case

Download all attachments as: .zip

Change History (4)

Changed 6 years ago by BrianM

failing case

Changed 6 years ago by BrianM

passing case

comment:1 Changed 6 years ago by BrewManNH

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 Changed 6 years ago by Jpm

  • Resolution set to No Bug
  • Status changed from new to closed

Design decision

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

Action
as closed The ticket will remain with no owner.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.