Skip to content

Fix LineFileReader dropping the final line without a newline - #15184

Open
cuishuang wants to merge 1 commit into
facebook:mainfrom
cuishuang:main
Open

Fix LineFileReader dropping the final line without a newline#15184
cuishuang wants to merge 1 commit into
facebook:mainfrom
cuishuang:main

Conversation

@cuishuang

Copy link
Copy Markdown

Fix LineFileReader dropping the final line when the input file does not end with a newline.

When a short read indicates EOF, ReadLine() currently returns false before consuming data remaining in the buffer. It also drops data already accumulated in out when the final line length is an exact multiple of the internal 8192-byte buffer size.

@meta-cla meta-cla Bot added the CLA Signed label Sep 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant