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

Tar symlink support #423

Merged
merged 4 commits into from
Nov 5, 2018
Merged

Conversation

markfinal
Copy link
Contributor

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.

…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.
@adamhathcock adamhathcock merged commit a95bbaf into adamhathcock:master Nov 5, 2018
@adamhathcock
Copy link
Owner

Thanks!

@markfinal
Copy link
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?

@MattKotsenas
Copy link
Contributor

MattKotsenas commented Feb 26, 2019

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!

@adamhathcock
Copy link
Owner

Sorry. I'll look at getting a new version out soon, I promise!

@adamhathcock
Copy link
Owner

https://www.nuget.org/packages/sharpcompress/0.23.0 done!

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.

3 participants