small bug (time) when extracting files from tar (or zip)

Bug reports will be moved here when the described bug has been fixed

Moderators: white, Hacker, petermad, Stefan2

Post Reply
kRyszard
New Member
New Member
Posts: 1
Joined: 2008-09-25, 07:23 UTC

small bug (time) when extracting files from tar (or zip)

Post by *kRyszard »

1. Get a file that modification time's seconds is an ODD number
2. tar it with

Code: Select all

tar -cf file.tar file
3. extract it with tc's internal dearchiver (open the arc in a left panel and copy it with f5 to the right panel)
4. the extracted file's mod time's seconds is an EVEN number
5. extract the same file with console command:

Code: Select all

tar -xf file.tar
-> time is correct

the problem also occurs when packing with internal archiver - you can view the tar file with a hax viewer and see the time is incorrect.

this bug is really annoying when moving or backing up cvs repositories: files have different mod time and appear as modified although they are not.
User avatar
Hacker
Moderator
Moderator
Posts: 13052
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

TC internally handles time in the FAT32 precision, which is 2 seconds.

HTH
Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

That's correct, only TC 7.5 will use NTFS time internally.
Author of Total Commander
https://www.ghisler.com
User avatar
X-Byte
Member
Member
Posts: 173
Joined: 2004-11-29, 09:34 UTC
Location: Hessen, Germany

Post by *X-Byte »

Finally!

Thanks a lot :!:
User avatar
DrShark
Power Member
Power Member
Posts: 1872
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262
Contact:

Post by *DrShark »

Total Commander 7.5.
Tar packer, original file writetime second number: ODD;
Packed file writetime second number: ODD.
Zip packer, original file writetime second number: ODD;
Packed file writetime second number: EVEN.
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
User avatar
Hacker
Moderator
Moderator
Posts: 13052
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

DrShark,
Zip packer, original file writetime second number: ODD;
Packed file writetime second number: EVEN.
Well, is the ZIP format able to store and odd timestamp?

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
User avatar
DrShark
Power Member
Power Member
Posts: 1872
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262
Contact:

Post by *DrShark »

Hacker wrote:DrShark,
Zip packer, original file writetime second number: ODD;
Packed file writetime second number: EVEN.
Well, is the ZIP format able to store and odd timestamp?

Roman
I don't know:) I just checked if kRyszard's problem still exists in 7.5.
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Thanks for confirming the fix with TAR! It uses the Unix file time, which supports odd and even seconds. However, ZIP uses the FAT file time, which supports only even seconds.
Author of Total Commander
https://www.ghisler.com
Post Reply