Ticket #3070: changes to files in nested .zip archives are lost.

How to reproduce:

Changes to the text file inside nested .zip file are lost.

echo "hello, world" >hello.txt
zip message.zip hello.txt
zip wrapper.zip message.zip
rm -v hello.txt message.zip

Using mc enter to wrapper.zip/message.zip and edit (F4) "hello.txt",
save, then exit mc.

unzip wrapper.zip
unzip message.zip

Result: changes were not saved to "hello.txt".
Expected result: changes are saved.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Andrew Borodin 2013-09-07 17:15:40 +04:00
parent 852b885796
commit 1988ce2759

View File

@ -377,7 +377,7 @@ extfs_free_archive (struct archive *archive)
vfs_path_t *local_name_vpath, *name_vpath;
local_name_vpath = vfs_path_from_str (archive->local_name);
name_vpath = vfs_path_from_str (archive->local_name);
name_vpath = vfs_path_from_str (archive->name);
mc_stat (local_name_vpath, &my);
mc_ungetlocalcopy (name_vpath, local_name_vpath,
archive->local_stat.st_mtime != my.st_mtime);