Skip to content

Commit

Permalink
Add more informative “file too long” error message
Browse files Browse the repository at this point in the history
To `toTarPath`, make it output actual filename apart from
"File name too long".
  • Loading branch information
ffaf1 committed Dec 6, 2024
1 parent f6ae02c commit 4017f61
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Codec/Archive/Tar/Types.hs
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ toTarPath :: Bool -- ^ Is the path for a directory? This is needed because for
toTarPath isDir path = case toTarPath' path' of
FileNameEmpty -> Left "File name empty"
FileNameOK tarPath -> Right tarPath
FileNameTooLong{} -> Left "File name too long"
FileNameTooLong{} -> Left $ "File name too long: " ++ path'
where
path' = if isDir && not (FilePath.Native.hasTrailingPathSeparator path)
then path <> [FilePath.Native.pathSeparator]
Expand Down

0 comments on commit 4017f61

Please sign in to comment.