Browse Source

Fix symlink extraction

pull/55/head
Ionite 1 year ago
parent
commit
633d381736
No known key found for this signature in database
  1. 7
      StabilityMatrix.Core/Helper/ArchiveHelper.cs

7
StabilityMatrix.Core/Helper/ArchiveHelper.cs

@ -239,6 +239,13 @@ public static partial class ArchiveHelper
// Check if symbolic link
if (entry.LinkTarget != null)
{
// Not sure why but symlink entries have a key that ends with a space
// and some broken path suffix, so we'll remove everything after the last space
if (outputPath.Contains(' '))
{
outputPath = outputPath[..outputPath.LastIndexOf(' ')];
}
Logger.Debug($"Extracting symbolic link [{entry.Key.ToRepr()}] " +
$"({outputPath.ToRepr()} to {entry.LinkTarget.ToRepr()})");
// Try to write link, if fail, continue copy file

Loading…
Cancel
Save