Skip to content

std.tar: pass entry kind to rootDir to avoid setting root_dir to file #23456

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 16, 2025

Conversation

dasimmet
Copy link
Contributor

@dasimmet dasimmet commented Apr 3, 2025

Hi, now i think i've got it. std.tar.rootDir should depend on the std.tar.FileKind. If its a Directory,
return its path, files and symlinks at the top level should return an empty path.
Also added a test and testdata.

Closes #22752

@dasimmet dasimmet changed the title std.tar: pass entry kind to findRoot to avoid setting root_dir to file std.tar: pass entry kind to rootDir to avoid setting root_dir to file Apr 3, 2025
@alexrp
Copy link
Member

alexrp commented Apr 10, 2025

cc @ianic

@ianic
Copy link
Contributor

ianic commented Apr 10, 2025

cc @ianic

LGTM.

@alexrp alexrp enabled auto-merge (squash) April 16, 2025 16:24
@alexrp alexrp merged commit 5be3c78 into ziglang:master Apr 16, 2025
9 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.

zig fetch and std.tar.pipeToFileSystem returns wrong archive root on a single file archive
3 participants