Skip to content

Use sizeof rather than length for file length check #260

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 3, 2023

Conversation

MichaelHatherly
Copy link
Contributor

This issue only seems to occur when there is a file with contents that contained just enough Unicode characters to push the sizeof value over 254 while keeping length under that limit. I'd assume that isfile really actually cares about number of bytes rather than apparent character length.

This issue only seems to occur when there is a file with contents
that contained just enough Unicode characters to push the `sizeof`
value over 254 while keeping `length` under that limit.
@codecov
Copy link

codecov bot commented Jun 3, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (0dd0f0f) 89.69% compared to head (f0df3c6) 89.69%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #260   +/-   ##
=======================================
  Coverage   89.69%   89.69%           
=======================================
  Files          10       10           
  Lines        1775     1775           
=======================================
  Hits         1592     1592           
  Misses        183      183           
Impacted Files Coverage Δ
src/utils.jl 89.47% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Owner

@quinnj quinnj left a comment

Choose a reason for hiding this comment

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

Thanks!

@quinnj quinnj merged commit b23f72b into quinnj:main Jun 3, 2023
@MichaelHatherly MichaelHatherly deleted the mh/file-length-check branch June 3, 2023 05:37
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.

2 participants