mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-02-03 21:23:38 +00:00
[PR #52] [MERGED] Tar long name support #814
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/adamhathcock/sharpcompress/pull/52
Author: @sander2
Created: 4/7/2015
Status: ✅ Merged
Merged: 4/9/2015
Merged by: @adamhathcock
Base:
master← Head:tar-long-name-support📝 Commits (3)
0886442Tar: Support for writing long filenames (>100 chars) using longlink3113500don't write trailing zero in WriteOctalBytes26ddc09add unit test for writing tar archives containing long filenames📊 Changes
2 files changed (+80 additions, -27 deletions)
View changed files
📝
SharpCompress.Test/Tar/TarArchiveTests.cs(+38 -0)📝
SharpCompress/Common/Tar/Headers/TarHeader.cs(+42 -27)📄 Description
Support for writing arbitrarily long filenames in tar archives.
The existing code used the ustar prefix field for supporting filepaths up to 255 chars (the actual maximum filepath length depends on the exact location of the slashes in the pat). However, there was a bug (several bugs, in fact) in the implementation that caused the filewriter to throw an error when a filepath of > 100 chars was used.
This pull request drops the use of the ustar prefix field in favor of the use of LongLinks. As far as I can tell, the use of LongLink is more common than the use of the ustar prefix field. Both 7zip and gnu tar use LongLinks by default.
Since the previous implementation never worked anyway, there are no users depending on the use of the ustar prefix field.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.