-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Tar: filesizes >= 8Gb are truncated on extraction due to incorrect size being written #76563
Comments
Tagging subscribers to this area: @dotnet/area-system-io Issue DetailsFrom https://en.wikipedia.org/wiki/Tar_(computing)
You can also see this table to understand filesize capabilities of each format: Create a 8 Gb file and test with BSD Tar and ustar format:
With GNU Tar and v7 and ustar formats:
Using We should:
|
There's another issue related to large files; the reader parses the resulting octal size to runtime/src/libraries/System.Formats.Tar/src/System/Formats/Tar/TarHeader.Read.cs Lines 379 to 383 in 14cc725
We should address that as well as part of this issue. |
From https://en.wikipedia.org/wiki/Tar_(computing)
You can also see this table to understand filesize capabilities of each format:
Create a 8 Gb file and test
On Windows I used
fsutil file createnew large_file 8589934592
.On Ubuntu I used
dd if=/dev/zero of=8g.img bs=1 count=0 seek=8G
.with BSD Tar and ustar format:
With GNU Tar and v7 and ustar formats:
Using
TarWriter
andTarFile
I noticed we are writing an incorrect size and that causes that the entry gets truncated when is extracted, either withTarFile.ExtractToDirectory
or with another tool.We should:
V7TarEntry
orUstarTarEntry
entry would exceed the 8bg limit.cc @carlossanlop
The text was updated successfully, but these errors were encountered: