diff --git a/src/libraries/System.Formats.Tar/src/System/Formats/Tar/TarEntry.Windows.cs b/src/libraries/System.Formats.Tar/src/System/Formats/Tar/TarEntry.Windows.cs index c48f20834ead09..c0557362961b27 100644 --- a/src/libraries/System.Formats.Tar/src/System/Formats/Tar/TarEntry.Windows.cs +++ b/src/libraries/System.Formats.Tar/src/System/Formats/Tar/TarEntry.Windows.cs @@ -14,14 +14,14 @@ public abstract partial class TarEntry // Throws on Windows. Block devices are not supported on this platform. private void ExtractAsBlockDevice(string destinationFileName) { - Debug.Assert(EntryType is TarEntryType.BlockDevice or TarEntryType.CharacterDevice); + Debug.Assert(EntryType is TarEntryType.BlockDevice); throw new InvalidOperationException(SR.IO_DeviceFiles_NotSupported); } // Throws on Windows. Character devices are not supported on this platform. private void ExtractAsCharacterDevice(string destinationFileName) { - Debug.Assert(EntryType is TarEntryType.BlockDevice or TarEntryType.CharacterDevice); + Debug.Assert(EntryType is TarEntryType.CharacterDevice); throw new InvalidOperationException(SR.IO_DeviceFiles_NotSupported); } diff --git a/src/libraries/System.Formats.Tar/src/System/Formats/Tar/TarHeader.Write.cs b/src/libraries/System.Formats.Tar/src/System/Formats/Tar/TarHeader.Write.cs index d6d435b1f491b4..bea775a76aac3c 100644 --- a/src/libraries/System.Formats.Tar/src/System/Formats/Tar/TarHeader.Write.cs +++ b/src/libraries/System.Formats.Tar/src/System/Formats/Tar/TarHeader.Write.cs @@ -509,7 +509,7 @@ private int WriteCommonFields(Span buffer, TarEntryType actualEntryType) // Calculates how many data bytes should be written, depending on the position pointer of the stream. // Only works if the stream is seekable. - public long GetTotalDataBytesToWrite() + internal long GetTotalDataBytesToWrite() { if (_dataStream == null) {