Skip to content

Make ArchiveUtils work on Windows#683

Draft
ThomasVitale wants to merge 1 commit intooras-project:mainfrom
ThomasVitale:gh-671
Draft

Make ArchiveUtils work on Windows#683
ThomasVitale wants to merge 1 commit intooras-project:mainfrom
ThomasVitale:gh-671

Conversation

@ThomasVitale
Copy link
Copy Markdown
Contributor

@ThomasVitale ThomasVitale commented Apr 18, 2026

Description

  • Handle POSIX permissions only on compatible OSes, with fallback on default, standard permissions.
  • Include check to ensure the OS support symlinks before creating them. On Windows, a warning is logged when trying to create a symlink without the necessary permissions.

Fixes gh-671

Testing done

Confirmed the automated tests for ArchiveUtils still work on macOS and Linux. I'm still running some tests on Windows. After that, I'll move the PR from Draft to Ready-to-review.

Submitter checklist

  • I have read and understood the CONTRIBUTING guide
  • I have run mvn license:update-file-header, mvn spotless:apply, pre-commit run -a, mvn clean install before opening the PR

* Handle POSIX permissions only on compatible OSes, with fallback on default, standard permissions.
* Include check to ensure the OS support symlinks before creating them. On Windows, a warning is logged when trying to create a symlink without the necessary permissions.

Fixes oras-projectgh-671

Signed-off-by: Thomas Vitale <ThomasVitale@users.noreply.github.com>
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 18, 2026

Codecov Report

❌ Patch coverage is 65.00000% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 87.10%. Comparing base (8d8a5e6) to head (a7cdbda).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
src/main/java/land/oras/utils/ArchiveUtils.java 65.00% 5 Missing and 2 partials ⚠️

❌ Your patch check has failed because the patch coverage (65.00%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@             Coverage Diff              @@
##               main     #683      +/-   ##
============================================
+ Coverage     86.70%   87.10%   +0.40%     
- Complexity      943      944       +1     
============================================
  Files            43       43              
  Lines          2910     2923      +13     
  Branches        364      367       +3     
============================================
+ Hits           2523     2546      +23     
+ Misses          229      217      -12     
- Partials        158      160       +2     

☔ 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.

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.

ArchiveUtils doesn't work on Windows

1 participant