[PR #423] [MERGED] Tar symlink support #1019

Open
opened 2026-01-29 22:18:38 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/adamhathcock/sharpcompress/pull/423
Author: @markfinal
Created: 11/3/2018
Status: Merged
Merged: 11/5/2018
Merged by: @adamhathcock

Base: masterHead: tarsymlink


📝 Commits (4)

  • 192b9c1 Ref #248. Ref #132. Tar reader support for symlinks for .NET standard 2 and Posix platforms
  • d91e58f Refs #248. Refs #132. Added a test case of a tar containing symlinks
  • 3f43384 Removed unnecessary code
  • 70bafa6 Tar symlink extraction

📊 Changes

13 files changed (+114 additions, -10 deletions)

View changed files

📝 src/SharpCompress/Common/Entry.cs (+5 -0)
📝 src/SharpCompress/Common/ExtractionMethods.cs (+21 -10)
📝 src/SharpCompress/Common/ExtractionOptions.cs (+9 -0)
📝 src/SharpCompress/Common/GZip/GZipEntry.cs (+2 -0)
📝 src/SharpCompress/Common/IEntry.cs (+1 -0)
📝 src/SharpCompress/Common/Rar/RarEntry.cs (+2 -0)
📝 src/SharpCompress/Common/SevenZip/SevenZipEntry.cs (+2 -0)
📝 src/SharpCompress/Common/Tar/Headers/TarHeader.cs (+7 -0)
📝 src/SharpCompress/Common/Tar/TarEntry.cs (+2 -0)
📝 src/SharpCompress/Common/Zip/ZipEntry.cs (+2 -0)
📝 tests/SharpCompress.Test/SharpCompress.Test.csproj (+1 -0)
📝 tests/SharpCompress.Test/Tar/TarReaderTests.cs (+60 -0)
tests/TestArchives/Archives/TarWithSymlink.tar.gz (+0 -0)

📄 Description

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.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/adamhathcock/sharpcompress/pull/423 **Author:** [@markfinal](https://github.com/markfinal) **Created:** 11/3/2018 **Status:** ✅ Merged **Merged:** 11/5/2018 **Merged by:** [@adamhathcock](https://github.com/adamhathcock) **Base:** `master` ← **Head:** `tarsymlink` --- ### 📝 Commits (4) - [`192b9c1`](https://github.com/adamhathcock/sharpcompress/commit/192b9c1e8bb36b76fb2b05ebd36918982bb1d6bf) Ref #248. Ref #132. Tar reader support for symlinks for .NET standard 2 and Posix platforms - [`d91e58f`](https://github.com/adamhathcock/sharpcompress/commit/d91e58f2cce50db1ea57017eeb6f613b7c088342) Refs #248. Refs #132. Added a test case of a tar containing symlinks - [`3f43384`](https://github.com/adamhathcock/sharpcompress/commit/3f4338489cb0311ced6b361c235a78c718ebd241) Removed unnecessary code - [`70bafa6`](https://github.com/adamhathcock/sharpcompress/commit/70bafa653b552b2f629b9090126153bca4fe772f) Tar symlink extraction ### 📊 Changes **13 files changed** (+114 additions, -10 deletions) <details> <summary>View changed files</summary> 📝 `src/SharpCompress/Common/Entry.cs` (+5 -0) 📝 `src/SharpCompress/Common/ExtractionMethods.cs` (+21 -10) 📝 `src/SharpCompress/Common/ExtractionOptions.cs` (+9 -0) 📝 `src/SharpCompress/Common/GZip/GZipEntry.cs` (+2 -0) 📝 `src/SharpCompress/Common/IEntry.cs` (+1 -0) 📝 `src/SharpCompress/Common/Rar/RarEntry.cs` (+2 -0) 📝 `src/SharpCompress/Common/SevenZip/SevenZipEntry.cs` (+2 -0) 📝 `src/SharpCompress/Common/Tar/Headers/TarHeader.cs` (+7 -0) 📝 `src/SharpCompress/Common/Tar/TarEntry.cs` (+2 -0) 📝 `src/SharpCompress/Common/Zip/ZipEntry.cs` (+2 -0) 📝 `tests/SharpCompress.Test/SharpCompress.Test.csproj` (+1 -0) 📝 `tests/SharpCompress.Test/Tar/TarReaderTests.cs` (+60 -0) ➕ `tests/TestArchives/Archives/TarWithSymlink.tar.gz` (+0 -0) </details> ### 📄 Description 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. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-29 22:18:38 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/sharpcompress#1019