Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix crash when converting size string to UInt64 (#1)
For some tar files, `sizeString` returns a string with a whitespace at the end. `UInt64(sizeString, radix: 8)` would then return `nil`, and unwrapping the optional with `!` would lead to a crash. Unlike the `UInt64` constructor, `strtoull` properly handles the string with whitespace at the end. Another option would be to trim the whitespaces at the end of `sizeString` but it seemed safer to avoid manipulating that string.
- Loading branch information