Skip to content

Preserve explicit libarchive directory metadata - #2274

Open
xiehuanyi wants to merge 1 commit into
fsspec:masterfrom
xiehuanyi:fix-libarchive-directory-metadata
Open

xiehuanyi wants to merge 1 commit into
fsspec:masterfrom
xiehuanyi:fix-libarchive-directory-metadata

Conversation

@xiehuanyi

Copy link
Copy Markdown

Explicit directory entries in an archive lose their mode, owner, group, and modification time when the libarchive directory cache adds implied parents. A directory named directory/ is also cached separately from its implied directory entry, so info("directory") returns only synthetic fields.

Normalize explicit directory names and fill only missing parent entries after reading the archive. This retains actual metadata regardless of whether the directory precedes or follows its child.

Validation: both archive-order regression cases failed before the fix; all 256 libarchive, shared archive, ZIP, and TAR tests pass afterward. All pre-commit hooks pass, including Ruff and codespell.

Copilot AI balanced review requested due to automatic review settings October 11, 2026 18:16

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

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