[PR #513] [MERGED] Added default implementation with warning for symbolic links #1068

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

📋 Pull Request Information

Original PR: https://github.com/adamhathcock/sharpcompress/pull/513
Author: @RealOrko
Created: 5/21/2020
Status: Merged
Merged: 5/22/2020
Merged by: @adamhathcock

Base: masterHead: symbolic-link-default-write


📝 Commits (1)

  • 538b388 Added a warning for the writing of symbolic links with a link to the original GitHub issue for the DOTNET runtime

📊 Changes

1 file changed (+8 additions, -2 deletions)

View changed files

📝 src/SharpCompress/Common/ExtractionOptions.cs (+8 -2)

📄 Description

Hi

I changed the default implementation for writing symbolic links to emit a warning instead of throwing an exception for this issue.

Not sure how this runs for performance.

Another thing we could try is to create platform specific commands that call out to a shell command for the various platforms.

Something like:

if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) {
   ShellCommands.Exec($"mklink /H {source} {target}")
} else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) {
   ShellCommands.Exec($"ln -s {target} {source}")
} else if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) {
   ShellCommands.Exec($"ln -s {target} {source}")
}

🔄 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/513 **Author:** [@RealOrko](https://github.com/RealOrko) **Created:** 5/21/2020 **Status:** ✅ Merged **Merged:** 5/22/2020 **Merged by:** [@adamhathcock](https://github.com/adamhathcock) **Base:** `master` ← **Head:** `symbolic-link-default-write` --- ### 📝 Commits (1) - [`538b388`](https://github.com/adamhathcock/sharpcompress/commit/538b38869fde43b90a1b6fde748cd4512b318f9b) Added a warning for the writing of symbolic links with a link to the original GitHub issue for the DOTNET runtime ### 📊 Changes **1 file changed** (+8 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `src/SharpCompress/Common/ExtractionOptions.cs` (+8 -2) </details> ### 📄 Description Hi I changed the default implementation for writing symbolic links to emit a warning instead of throwing an exception for this [issue](https://github.com/adamhathcock/sharpcompress/issues/464). Not sure how this runs for performance. Another thing we could try is to create platform specific commands that call out to a shell command for the various platforms. Something like: ```csharp if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) { ShellCommands.Exec($"mklink /H {source} {target}") } else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) { ShellCommands.Exec($"ln -s {target} {source}") } else if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) { ShellCommands.Exec($"ln -s {target} {source}") } ``` --- <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:52 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/sharpcompress#1068