Tar: Use indexer setter instead of Add on ExtendedAttributes dictionary (#76404)
authorDavid CantĂș <dacantu@microsoft.com>
Mon, 3 Oct 2022 20:45:37 +0000 (15:45 -0500)
committerGitHub <noreply@github.com>
Mon, 3 Oct 2022 20:45:37 +0000 (15:45 -0500)
commit221717bc1a48f164c5eb2f8ee050f04510a21d41
tree350b54595fba52b20bcad1ba0540c47793e0f91a
parent433457d5d7c6d27b42b714551e67ba074d955041
Tar: Use indexer setter instead of Add on ExtendedAttributes dictionary (#76404)

* Use indexer setter instead of Add on ExtendedAttributes dictionary

* Add roundtrip tests

* Fix TryAddStringField and always set mtime
src/libraries/System.Formats.Tar/src/System/Formats/Tar/TarHeader.Write.cs
src/libraries/System.Formats.Tar/tests/TarTestsBase.cs
src/libraries/System.Formats.Tar/tests/TarWriter/TarWriter.WriteEntry.Entry.Roundtrip.Tests.cs
src/libraries/System.Formats.Tar/tests/TarWriter/TarWriter.WriteEntry.Tests.cs
src/libraries/System.Formats.Tar/tests/TarWriter/TarWriter.WriteEntryAsync.Entry.Roundtrip.Tests.cs
src/libraries/System.Formats.Tar/tests/TarWriter/TarWriter.WriteEntryAsync.Tests.cs