Bug 168020 - mtimes of extracted files wrong
Summary: mtimes of extracted files wrong
Status: RESOLVED FIXED
Alias: None
Product: ark
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Harald Hvaal
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-08-01 19:00 UTC by kujub
Modified: 2008-08-17 11:04 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description kujub 2008-08-01 19:00:14 UTC
Version:           2.10.999 (using 4.1.00 (KDE 4.1.0), Arch Linux)
Compiler:          gcc
OS:                Linux (i686) release 2.6.25-vanilla

The modification time of all files created is the time when extraction happend. 

How to reproduce:

Open some tgz-file.
Click Actions Extract...
Choose some destination folder.

Expected Behaviour:

Ark should set the mtimes to those contained in the archive imho.
Comment 1 kujub 2008-08-14 18:11:08 UTC
Just a possible workaround for this:
Extract And Compress KDE4
http://www.kde-apps.org/content/show.php/Extract+And+Compress+KDE4?content=84206
Comment 2 Harald Hvaal 2008-08-15 14:48:33 UTC
Kurt: is switching to another application really a workaround for the ark bug described here?

Anyways, I tested this with my trunk version and I can indeed confirm that ark does not preserve mtimes of files during extraction.

The actual creation of files is all handled by libarchive, so I imagine this is just a question of finding the right flag to set before extraction. Should be backportable as well for 4.1.1
Comment 3 Harald Hvaal 2008-08-16 07:47:57 UTC
SVN commit 847705 by metellius:

BUG: 168020
File times are restored


 M  +1 -1      libarchivehandler.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=847705
Comment 4 kujub 2008-08-16 11:35:21 UTC
Thank you for that.

I applied the patch from WebSVN here and now I get when extacting mprime2414.tar.gz with ark:

$ LANG=C ll --full-time
total 4020
-rw-r--r-- 1 kurt kurt    4917 2005-08-09 20:01:54.000000000 +0200 license.txt
-rwxr-xr-x 1 kurt kurt 4015796 2005-08-09 20:01:55.000000000 +0200 mprime
-rw-r--r-- 1 kurt kurt   25925 2005-08-09 20:01:54.000000000 +0200 readme.txt
-rw-r--r-- 1 kurt kurt    6860 2005-08-09 20:01:54.000000000 +0200 stress.txt
-rw-r--r-- 1 kurt kurt   14817 2005-08-09 20:01:54.000000000 +0200 undoc.txt
-rw-r--r-- 1 kurt kurt   34486 2008-08-16 11:20:26.071195557 +0200 whatsnew.txt

But tar lists:

$ tar -tvf mprime2414.tar.gz
-rw-r--r-- root/root      4917 2005-08-09 20:01 license.txt
-rwxr-xr-x root/root   4015796 2005-08-09 20:01 mprime
-rw-r--r-- root/root     25925 2005-08-09 20:01 readme.txt
-rw-r--r-- root/root      6860 2005-08-09 20:01 stress.txt
-rw-r--r-- root/root     14817 2005-08-09 20:01 undoc.txt
-rw-r--r-- root/root     34486 2005-08-09 20:01 whatsnew.txt

So it seems to help only for some of the files. (weird)

Link to the used file: ftp://mersenne.org/gimps/mprime2414.tar.gz
Comment 5 Harald Hvaal 2008-08-16 17:11:27 UTC
I can indeed confirm this, very weird. Will do some debugging and see if I can find out why this happens. Reopening the bug meanwhile.
Comment 6 Harald Hvaal 2008-08-17 05:16:43 UTC
SVN commit 848127 by metellius:

BUG: 168020
Last entry was not finished, caused by archive_write_finish not being called.


 M  +2 -0      libarchivehandler.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=848127
Comment 7 kujub 2008-08-17 11:04:20 UTC
Ok this one seems to bee fixed now.
Thank you.