Repository navigation
Unify link extraction across RAR formats - #106
Merged
Merged
Conversation
Expose common file/link callbacks and route CLI extraction through one filesystem adapter. Decode legacy Unix link targets in the existing CRC-checked pass, preserving solid history, cancellation, and shared workspace/output limits. Keep existing byte-oriented APIs unchanged. Share filename resolution, staging, overwrite handling, and publication between legacy and RAR5 extraction. Preserve native target bytes and avoid restoring metadata through symbolic links. Cover split targets, failures, resource limits, and UnRAR parity with regression tests. Closes #105
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Legacy Unix symbolic links were extracted as regular files containing their targets. Add common file/link extraction callbacks and route CLI extraction through them, so RAR 2/4 links become real symlinks and RAR5 links use the same filesystem staging and publication path.
The library decodes legacy targets in the existing extraction pass, preserving solid history, CRC verification, cancellation, and workspace/output budgets. Existing byte-oriented APIs retain their behavior. The CLI keeps filename decoding and path policy at the filesystem boundary, avoids restoring metadata through symlinks, and preserves verified predecessors on later failures.
Legacy link targets remain native Unix bytes. The new link API rejects targets over 64 KiB; the CLI applies its existing restrictions on absolute and parent-relative link targets. The new extraction API recognizes links only in Unix-host records, matching UnRAR; existing BeOS inspection/readlink/rewrite behavior remains unchanged. Windows still requires symlink privileges, and the legacy format supplies no target-directory hint.
Closes #105
Validation:
Native Windows/macOS execution is covered by this PR’s CI.