From b57554a59667d1ce9f19a2dfdfbb35b9d5399104 Mon Sep 17 00:00:00 2001 From: Julian Ospald Date: Sun, 19 Nov 2023 18:33:12 +0800 Subject: [PATCH] Use packAscii in longSymlinkEntry --- Codec/Archive/Tar/Types.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Codec/Archive/Tar/Types.hs b/Codec/Archive/Tar/Types.hs index 2c2bc17..37ecbcd 100644 --- a/Codec/Archive/Tar/Types.hs +++ b/Codec/Archive/Tar/Types.hs @@ -276,7 +276,7 @@ longLinkEntry tarpath = Entry { longSymLinkEntry :: FilePath -> Entry longSymLinkEntry linkTarget = Entry { entryTarPath = TarPath (BS.Char8.pack "././@LongLink") BS.empty, - entryContent = OtherEntryType 'K' (LBS.fromStrict $ BS.Char8.pack linkTarget) (fromIntegral $ length linkTarget), + entryContent = OtherEntryType 'K' (LBS.fromStrict $ packAscii linkTarget) (fromIntegral $ length linkTarget), entryPermissions = ordinaryFilePermissions, entryOwnership = Ownership "" "" 0 0, entryTime = 0,