         if magic == [0x75, 0x73, 0x74, 0x61, 0x72, 0x20, 0x20, 0x00] ||
             magic == [0x75, 0x73, 0x74, 0x61, 0x72, 0x00, 0x30, 0x30] ||
             magic == [0x75, 0x73, 0x74, 0x61, 0x72, 0x20, 0x30, 0x30] {
-            let ownerName = try pointerData.nullEndedAsciiString(cutoff: 32)
-            ownerUserName = ownerName
-
-            let groupName = try pointerData.nullEndedAsciiString(cutoff: 32)
-            ownerGroupName = groupName
+            ownerUserName = try pointerData.nullEndedAsciiString(cutoff: 32)
+            ownerGroupName = try pointerData.nullEndedAsciiString(cutoff: 32)
 
             deviceMajorNumber = try pointerData.nullSpaceEndedAsciiString(cutoff: 8)
             deviceMinorNumber = try pointerData.nullSpaceEndedAsciiString(cutoff: 8)
-            fileNamePrefix = try pointerData.nullEndedAsciiString(cutoff: 155)
+            name = try pointerData.nullEndedAsciiString(cutoff: 155) + (name ?? "")
         } else {
             ownerUserName = nil
             ownerGroupName = nil
             deviceMajorNumber = nil
             deviceMinorNumber = nil
-            fileNamePrefix = nil
-        }
+        }
+
+        // Set `name` and `linkName` to values from GNU format if possible.
+        name = longName ?? name
+        linkName = longLinkName ?? linkName
 
         var fieldsDict = [String: String]()
         try TarEntryInfo.parseHeader(globalExtendedHeader, &fieldsDict)

    /// Comment associated with the entry (PAX only).
    public private(set) var comment: String?

    /// Path to a linked file for symbolic link entry.
    public var linkPath: String? {
        return (paxLinkPath ?? gnuLongLinkName) ?? linkedFileName
    }

    private var paxLinkPath: String?

    /// Other entries from PAX extended headers.
    public private(set) var unknownExtendedHeaderEntries: [String: String] = [:]

    private let gnuLongName: String?
    private let gnuLongLinkName: String?

    let isGlobalExtendedHeader: Bool

    private let deviceMajorNumber: String?
    private let deviceMinorNumber: String?

    /// The most recent access time of the original file or directory (PAX only).
    public private(set) var accessTime: Date?

