Add comprehensive symlink support to BFC containers#6
Merged
zombocoder merged 3 commits intomainfrom Sep 13, 2025
Merged
Conversation
- Implemented symlink addition in the container with `bfc_add_symlink`. - Added symlink extraction functionality in `extract_symlink`. - Updated directory processing to handle symlinks during extraction. - Enhanced info display to include symlink statistics. - Modified file mode formatting to recognize symlinks.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request adds full support for symbolic links (symlinks) to the container format and CLI tools. The changes include the ability to add, list, extract, and display information about symlinks, as well as improvements to the test suite to verify symlink handling. The implementation ensures correct preservation of symlink targets, metadata, and compatibility with compression and encryption.
Symlink Support:
bfc_add_symlinkand its implementation to allow adding symlinks to containers, storing their target and metadata (include/bfc.h,src/lib/bfc_writer.c). [1] [2]cmd_createcommand to detect symlinks during both directory and file processing, and to add them using the new API (src/cli/cmd_create.c). [1] [2] [3] [4]Symlink Extraction:
src/cli/cmd_extract.c). [1] [2]lutimesusage to set symlink timestamps and improved error handling for existing files during extraction (src/cli/cmd_extract.c). [1] [2]Symlink Information and Listing:
cmd_infoandcmd_listcommands to recognize and display symlinks, including type, count, and mode in summary and detailed outputs (src/cli/cmd_info.c,src/cli/cmd_list.c). [1] [2] [3] [4] [5] [6]Testing and Build System:
.github/workflows/ci.yml).Makefileto enable building tests by default (Makefile).These changes ensure that symbolic links are first-class citizens in the container format, with robust handling across all relevant CLI commands and test coverage.