Tar symlink support - #423
Merged
Merged
Conversation
…mlinks for .NET standard 2 and Posix platforms Extracts linkname from the tar header, and exposes this on IEntry as the LinkTarget (string) property. If an entry is not a symlink, then that property is null. Uses Mono.Posix.NETStandard nuget to create a symlink. However, this is only applicable to .NET standard 2.0+. So far, unable to find a nuget that works for older versions. Also, not sure what to do on Windows.
…tar containing symlinks This is a source archive of the MoltenVK project from github, which is my use-case for SharpCompress. I added a test case in the project, which should extract the tar, and validate any symlink targets with what the tar thinks it ought to be.
Extended SharpCompress.Common.ExtractionOptions with a delegate to write symbolic links. If not is null, and a symbolic link is encountered, an exception is thrown. Removed Mono.Posix.NETStandard from the library, but added to the .NET Core 2.1 test application. Extended the test to implement the delegate.
Owner
|
Thanks! |
Contributor
Author
|
Great, thanks! What's your criteria for making a release? Just wondering what a rough ETA would be to see this in a published Nuget? |
Contributor
|
Hi @adamhathcock! I also just ran into this problem, and verified that this feature fixes the issue for me. Would it be possible to get a new release? Let me know if there's anything I can do to help! |
Owner
|
Sorry. I'll look at getting a new version out soon, I promise! |
Owner
This was referenced May 9, 2026
This was referenced Jul 24, 2026
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.
Reworked the tar symlink support so that the ExtractionOptions now offers a delegate that an application can implement. Exception is thrown if a symlink is encountered but no delegate set.
Mono.Posix.NETStandard removed from the library, but added to the .NET Core 2.1 test app. Implemented the delegate for testing there.