Skip to content
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

fix: replace File.separator with forward-slash #4221

Conversation

paullatzelsperger
Copy link
Member

@paullatzelsperger paullatzelsperger commented May 29, 2024

What this PR changes/adds

Replaces the File.separator with a hard-coded forward slash, to avoid path errors on Windows.

Why it does that

Briefly state why the change was necessary.

Further notes

  • no tests - Windows is not a supported platform.

Linked Issue(s)

Closes #4219

Please be sure to take a look at the contributing guidelines and our etiquette for pull requests.

@paullatzelsperger paullatzelsperger added the bug Something isn't working label May 29, 2024
@paullatzelsperger
Copy link
Member Author

@stefan1207 FYI

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 75.35%. Comparing base (7f20ba5) to head (a2757d5).
Report is 280 commits behind head on main.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4221      +/-   ##
==========================================
+ Coverage   71.74%   75.35%   +3.61%     
==========================================
  Files         919     1039     +120     
  Lines       18457    20636    +2179     
  Branches     1037     1152     +115     
==========================================
+ Hits        13242    15551    +2309     
+ Misses       4756     4574     -182     
- Partials      459      511      +52     

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

Copy link
Member

@ndr-brt ndr-brt left a comment

Choose a reason for hiding this comment

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

I'm confused, shouldn't be \ the working separator on windows (that should be returned by File.separator on win systems)?

@paullatzelsperger
Copy link
Member Author

I'm confused, shouldn't be \ the working separator on windows (that should be returned by File.separator on win systems)?

no, because it's not a path on the actual file system, but a relative path inside the jar file

@paullatzelsperger paullatzelsperger requested a review from ndr-brt May 29, 2024 08:40
Copy link
Member

@ndr-brt ndr-brt left a comment

Choose a reason for hiding this comment

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

amazed by how win can still surprise me after these years! :D

@paullatzelsperger paullatzelsperger merged commit 329a24f into eclipse-edc:main May 29, 2024
20 checks passed
@paullatzelsperger paullatzelsperger deleted the fix/4219_use_slash_instead_of_separator branch May 29, 2024 08:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Jsonld files are not registered (Windows only)
4 participants