Skip to content

Tar symlink support - #423

Merged
adamhathcock merged 4 commits into
adamhathcock:masterfrom
markfinal:tarsymlink
Nov 5, 2018
Merged

Tar symlink support#423
adamhathcock merged 4 commits into
adamhathcock:masterfrom
markfinal:tarsymlink

Conversation

@markfinal

Copy link
Copy Markdown
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
Copy Markdown
Owner

Thanks!

@markfinal

Copy link
Copy Markdown
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

MattKotsenas commented Feb 26, 2019

Copy link
Copy Markdown
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!

@adamhathcock

Copy link
Copy Markdown
Owner

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

@adamhathcock

Copy link
Copy Markdown
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