Skip to content

fix(fs): off by one error in readTextFileLines - #3155

Merged
Legend-Master merged 2 commits into
tauri-apps:v2from
EliasStar:v2
Dec 9, 2025
Merged

Legend-Master merged 2 commits into
tauri-apps:v2from
EliasStar:v2

Conversation

@EliasStar

@EliasStar EliasStar commented Dec 9, 2025 •

Copy link
Copy Markdown
Contributor

Due to an off by one error in the implementation of readTextFileLines the done flag (which is 0 when not done) gets appended to each line. This PR fixes this by adding the missing - 1 to the end index of the call to bytes.slice.

Fixes #3154

Signed-off-by: EliasStar <31409841+EliasStar@users.noreply.github.com>
@EliasStar
EliasStar requested a review from a team as a code owner December 9, 2025 00:38
@EliasStar EliasStar changed the title fix: off by one error in readTextFileLines (#3154) fix(fs): off by one error in readTextFileLines Dec 9, 2025
@github-actions

github-actions Bot commented Dec 9, 2025 •

Copy link
Copy Markdown
Contributor

Package Changes Through 640abd3

There are 21 changes which include dialog-js with minor, dialog with minor, log with minor, log-js with minor, localhost with patch, barcode-scanner with patch, barcode-scanner-js with patch, deep-link with patch, deep-link-js with patch, fs with patch, fs-js with patch, http with patch, http-js with patch, nfc with patch, nfc-js with patch, updater with minor, updater-js with minor, upload with minor, upload-js with minor, websocket with patch, websocket-js with patch

Planned Package Versions

The following package releases are the planned based on the context of changes in this pull request.

package current next
api-example 2.0.38 2.0.39
api-example-js 2.0.34 2.0.35
deep-link-example-js 2.2.8 2.2.9
barcode-scanner 2.4.2 2.4.3
barcode-scanner-js 2.4.2 2.4.3
deep-link 2.4.5 2.4.6
deep-link-js 2.4.5 2.4.6
fs 2.4.4 2.4.5
fs-js 2.4.4 2.4.5
dialog 2.4.2 2.5.0
dialog-js 2.4.2 2.5.0
http 2.5.4 2.5.5
http-js 2.5.4 2.5.5
localhost 2.3.1 2.3.2
log 2.7.1 2.8.0
log-js 2.7.1 2.8.0
nfc 2.3.3 2.3.4
nfc-js 2.3.3 2.3.4
persisted-scope 2.3.4 2.3.5
single-instance 2.3.6 2.3.7
updater 2.9.0 2.10.0
updater-js 2.9.0 2.10.0
upload 2.3.2 2.4.0
upload-js 2.3.2 2.4.0
websocket 2.4.1 2.4.2
websocket-js 2.4.1 2.4.2

Add another change file through the GitHub UI by following this link.


Read about change files or the docs at github.com/jbolda/covector

@Legend-Master Legend-Master left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@Legend-Master
Legend-Master merged commit 521cd8b into tauri-apps:v2 Dec 9, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

plugin-fs readTextFileLines appends null byte to the end of each line

2 participants