mirror of
https://github.com/quamotion/dotnet-packaging.git
synced 2026-02-14 21:32:52 +00:00
[PR #50] [MERGED] Support writing Tar archives (Debian packages) with long file names #202
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/quamotion/dotnet-packaging/pull/50
Author: @qmfrederik
Created: 11/11/2017
Status: ✅ Merged
Merged: 11/13/2017
Merged by: @qmfrederik
Base:
master← Head:fixes/deb-long-filename📝 Commits (5)
15a6104Use Encoding.UTF8 on a byte array instead of a StreamReader to make sure we stop reading when we encounter a null (\0) character.015c0ceSupport reading tar archives which contain entries with long (> 100 characters) file names39057a9Support writing tar archives with file names > 99 charactersf8c62cbFix typo9efde1cSupport reading long link names, too📊 Changes
10 files changed (+207 additions, -18 deletions)
View changed files
📝
Packaging.Targets.Tests/Deb/DebPackageReaderTests.cs(+47 -1)➕
Packaging.Targets.Tests/Deb/largefilename.deb(+0 -0)📝
Packaging.Targets.Tests/IO/TarFileTests.cs(+53 -2)➕
Packaging.Targets.Tests/IO/largefilename.tar(+0 -0)📝
Packaging.Targets.Tests/Packaging.Targets.Tests.csproj(+6 -0)📝
Packaging.Targets/IO/Extensions.cs(+8 -2)📝
Packaging.Targets/IO/LinuxFileMode.cs(+11 -1)📝
Packaging.Targets/IO/TarFile.cs(+29 -1)📝
Packaging.Targets/IO/TarFileCreator.cs(+50 -10)📝
Packaging.Targets/IO/TarTypeFlag.cs(+3 -1)📄 Description
The file name in the Tar entry header is limited to 100 characters.
When adding a file with a longer file name to a Tar archive, you need to create a new entry with the name
././@LongLinkand typeL(TarTypeFlag.LongName), which contains the file name in the file contents.This PR adds support for reading/writing such tar archives.
Fixes #47
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.