This is a sample from a tar file class I created for a chef cookbook. In this example I'm iterating over entries in the tar file. Because of the way tar handles filenames over 100 chars (././@LongLink) I have to do something to register that i'm dealing a longlink and treat the next entry differently.
I would love any advice on how to clean this up. Its a super long method, I especially don't like that I have to set full_name
to nil and twice.
@miah to make sure I understand..
we can think of tar as a list of name/content tuples. if the name is of type
longlink
, then the associated content is empty, and the name applies to the content of the next tuple in this list?