From 265191ea055754469b665234cc5d883b0ad17d4e Mon Sep 17 00:00:00 2001 From: Timofey Solomko Date: Mon, 26 Jul 2021 21:16:48 +0300 Subject: [PATCH] [TAR] Remove TarEntryInfo.specialEntryType --- Sources/TAR/TarEntryInfo.swift | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/Sources/TAR/TarEntryInfo.swift b/Sources/TAR/TarEntryInfo.swift index d55ae5aa..7ae20ec3 100644 --- a/Sources/TAR/TarEntryInfo.swift +++ b/Sources/TAR/TarEntryInfo.swift @@ -167,9 +167,6 @@ public struct TarEntryInfo: ContainerEntryInfo { */ public var unknownExtendedHeaderRecords: [String: String]? - // TODO: Remove - var specialEntryType: TarHeader.SpecialEntryType? - let format: TarContainer.Format // TODO: Remove @@ -215,17 +212,9 @@ public struct TarEntryInfo: ContainerEntryInfo { } // File type - // TODO: -// guard case .normal(let entryType) = header.type -// else { fatalError("TarEntryInfo.init: unexpected TarHeader.type, \(header.type)") } -// self.type = entryType - switch header.type { - case .special(let specialType): - self.specialEntryType = specialType - self.type = .unknown - case .normal(let normalType): - self.type = normalType - } + guard case .normal(let entryType) = header.type + else { fatalError("TarEntryInfo.init: unexpected TarHeader.type, \(header.type)") } + self.type = entryType self.ownerUserName = (local?.uname ?? global?.uname) ?? header.uname self.ownerGroupName = (local?.gname ?? global?.gname) ?? header.gname