Skip to content

Conversation

@F0xWh1sp3r
Copy link
Contributor

@F0xWh1sp3r F0xWh1sp3r commented Oct 9, 2025

There are archives containing compressed symlinks, and you'd like to be able to unzip them as well. Additionally, some symlinks may point to files in other subfolders within the archive.

Changes proposed in this PR

  • Allow extracting archives where symlinks are compressed
  • Support symlinks pointing to files in other subfolders within the archive

Tests performed

  • Implemented three new tests: testUnzipSymlink, testUnzipCompressedSymlink, testInvalidSymlinkCompressionMethodErrorConditions
  • All unit tests pass

@F0xWh1sp3r F0xWh1sp3r force-pushed the symlinks branch 3 times, most recently from 72c50e0 to a667867 Compare October 10, 2025 07:38
@weichsel
Copy link
Owner

Thanks for providing this PR. Changes look good!

Some things I noticed:

  • The FileManager extension doesn't expose the new allowUncontainedSymlinks.
  • The allowUncontainedSymlinks parameter is a bit redundant now. Passing a URL pointing to the FS root via symlinksValidWithin has the same effect right? Should we deprecate allowUncontainedSymlinks?
  • There's a Swiftlint issue in one of the tests files.

@F0xWh1sp3r
Copy link
Contributor Author

Thank you for your time and review!

  • Added new symlinksValidWithin to the FileManager extension.
  • You are right that passing a URL pointing to the FS root via symlinksValidWithin has the same effect. Yes, we should deprecate allowUncontainedSymlinks. With the symlinksValidWithin parameter, we can specify the required boundaries for symlinks. I marked the old functions as deprecated .

@weichsel
Copy link
Owner

Great - Thanks for the changes!

@weichsel weichsel merged commit db45672 into weichsel:development Oct 15, 2025
10 checks passed
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.

2 participants