nwaples / rardecode

A go package for reading RAR archives.
BSD 2-Clause "Simplified" License
124 stars 28 forks source link

Unable to get modtime/date from rar file #39

Closed mholt closed 2 weeks ago

mholt commented 2 weeks ago

One of my package's users has reported that they can't get the dates from the contents of their rar file (linked in one of the later comments). I was able to confirm this, by printing the header values we get while iterating the entries:

&{ ... IsDir:false Solid:false HostOS:3 Attributes:32 PackedSize:7837 UnPackedSize:8090 UnKnownSize:false ModificationTime:0001-01-01 00:00:00 +0000 UTC CreationTime:0001-01-01 00:00:00 +0000 UTC AccessTime:0001-01-01 00:00:00 +0000 UTC Version:0}

But when I open the rar file using the Gnome archive utility it shows mod times just fine. Any ideas? :thinking:

nwaples commented 2 weeks ago

Nothing immediately. I will have to debug it

nwaples commented 2 weeks ago

I never implemented the code for v5 optional precision file times. I added a commit which hopefully fixes it.

mholt commented 2 weeks ago

Awesome, that works now!! Thank you very much :smiley: