Skip to content

More robust handling of filenames, paritucalrly errors about too long#264

Open
nstiurca wants to merge 2 commits into
quinnj:mainfrom
nstiurca:fix-long-filenames
Open

More robust handling of filenames, paritucalrly errors about too long#264
nstiurca wants to merge 2 commits into
quinnj:mainfrom
nstiurca:fix-long-filenames

Conversation

@nstiurca
Copy link
Copy Markdown

@nstiurca nstiurca commented Jul 7, 2023

On my system, I'm actually triggering the ENAMETOOLONG error code with strings of length ~150 characters. Not sure why, but I re-wrote the code based on the suggestion in the upstream bug.

@codecov
Copy link
Copy Markdown

codecov Bot commented Jul 10, 2023

Codecov Report

❌ Patch coverage is 87.50000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 89.67%. Comparing base (e33786c) to head (ec5fd2c).
⚠️ Report is 15 commits behind head on main.

Files with missing lines Patch % Lines
src/utils.jl 85.71% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #264      +/-   ##
==========================================
- Coverage   89.69%   89.67%   -0.02%     
==========================================
  Files          10       10              
  Lines        1775     1782       +7     
==========================================
+ Hits         1592     1598       +6     
- Misses        183      184       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread src/utils.jl
true
catch e
if isa(e, Base.IOError)
e.code != -36 # -36 is ENAMETOOLONG; other IO errors indicate valid filename
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

is this code consistent across OS platforms? can we add a test to catch the new code paths here?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I suspect the original code might work as intended on Windows, and this branch wouldn't ever be triggered. Still, yeah I'll try to write a test.

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