forked from dotnet/runtime
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove code duplication in TarHeader class (dotnet#72501)
* Missing ConfigureAwait(false) in await using. * Remove argument from TarSizeFieldNegative exception resource string. * TarHeader.TryGetNextHeaderAsync: Reduce duplication. * TarHeader.ReadExtendedAttributesBlockAsync: reduce duplication. * TarHeader.ReadGnuLongPathDataBlockAsync: reduce duplication. * TarHeader.ReadExtendedAttributesFromBuffer: reduce duplication. * TarHeader.WriteAsV7Async: Reduce duplication. * TarHeader.WriteAsUstarAsync: reduce duplication. * TarHeader.*Pax*Async: reduce duplication. * TarHeader.WriteAsGnuAsync: reduce duplication. * Use pretty switch for async writing. Move the sync version to its own method, to keep similar logic close by. * checksum => tmpChecksum for consistency with other similar methods. * Add ExtendedAttributes non-nullable property that initializes private nullable property if needed. * Remove unnecessary buffer cleaning call. Co-authored-by: carlossanlop <carlossanlop@users.noreply.github.com>
- Loading branch information
1 parent
b5904da
commit f379bfb
Showing
10 changed files
with
362 additions
and
445 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.