Skip to content
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

fix: Write very long filenames in GNUtar format correctly #50

Merged
merged 1 commit into from
Aug 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,9 @@ Thanks to everyone who has contributed to minitar:
- Mike Furr
- ooooooo_q
- Pete Fritchman
- Zach Dennis
- Vijay (bv-vijay)
- Yamamoto Kōhei
- Zach Dennis

[minitest]: https://github.com/seattlerb/minitest
[quality commit messages]: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html
Expand Down
4 changes: 4 additions & 0 deletions History.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
## 0.12 / 2024-08-DD

- Properly handle very long GNU filenames, resolving [#46][].
- Handle very long GNU filenames that are 512 or more bytes, resolving [#45][].
Originally implemented in [#47][] by Vijay, but accidentally closed.

## 0.11 / 2022-12-31

Expand Down Expand Up @@ -194,4 +196,6 @@
[#40]: https://github.com/halostatue/minitar/pull/40
[#42]: https://github.com/halostatue/minitar/pull/42
[#43]: https://github.com/halostatue/minitar/pull/43
[#45]: https://github.com/halostatue/minitar/issues/45
[#46]: https://github.com/halostatue/minitar/issues/46
[#47]: https://github.com/halostatue/minitar/pull/47
2 changes: 1 addition & 1 deletion lib/archive/tar/minitar/writer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ def write_header(header, long_name, short_name, prefix, needs_long_name)
:prefix => "",
:name => PosixHeader::GNU_EXT_LONG_LINK,
:typeflag => "L",
:size => long_name.length,
:size => long_name.length + 1,
:mode => 0
}
@io.write(PosixHeader.new(long_name_header))
Expand Down
Loading