Open nptr opened 10 months ago
This is more of a feature request, I think. TarArchive
does more of the heavy lifting, but at a cost of less flexibility. It shouldn't be much of a problem to skip reading the source if the size is set to 0
, though...
Describe the bug
Creating a symlink with
TarArchive.WriteEntry()
fails with anArgumentNullException
which i think is unfounded. Reason seems to be, thatWriteEntry()
expected file data where there should't be any. Creating a directory (where there also isn't data) succeeds because there is a separate code path to handle this case. I would expect that LF_SYMLINK is also exempted.Reproduction Code
https://dotnetfiddle.net/faKmUo
Steps to reproduce
SymlinkWithArchiveClass()
failed.Expected behavior
I would expect that
SymlinkWithArchiveClass()
succeeds, just like the lower level exampleSymlinkWithStreamClass()
, that directly utilizedTarOutputStream
, does.Operating System
Windows, macOS, Linux
Framework Version
.NET 7, .NET 6, .NET Framework 4.x
Tags
Tar
Additional context
No response