Skip to content

fix(tar): pass -C directory to create_tar for VFS file resolution#1135

Merged
chaliy merged 2 commits intomainfrom
fix/issue-1118-tar-stat-vfs
Apr 7, 2026
Merged

fix(tar): pass -C directory to create_tar for VFS file resolution#1135
chaliy merged 2 commits intomainfrom
fix/issue-1118-tar-stat-vfs

Conversation

@chaliy
Copy link
Copy Markdown
Contributor

@chaliy chaliy commented Apr 7, 2026

Summary

  • create_tar() never received the change_dir parameter from -C flag
  • File paths were resolved relative to cwd instead of the -C directory
  • Now resolves files relative to -C path when provided, matching extract behavior

Test plan

  • Spec test: tar_create_basic — basic archive creation from VFS files
  • Spec test: tar_create_with_C_flag-C resolves files correctly
  • Spec test: tar_create_gzip-czf creates gzip archive
  • All existing tests pass

Closes #1118

chaliy added 2 commits April 7, 2026 01:01
create_tar() never received the change_dir parameter from -C flag,
so file paths were resolved relative to cwd instead of the specified
directory. Now resolves files relative to -C path when provided.

Closes #1118
Now that tar -c correctly uses -C directory, the creation step needs
more headroom since it actually reads source files via VFS.
@chaliy chaliy merged commit 8314c42 into main Apr 7, 2026
27 checks passed
@chaliy chaliy deleted the fix/issue-1118-tar-stat-vfs branch April 7, 2026 02:27
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.

fix(tar): tar -c cannot stat files on VFS

1 participant