Unzip files breaks

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

Moderators: Hacker, petermad, Stefan2, white

User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50386
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Unzip files breaks

Post by *ghisler(Author) »

This should be fixed in Total Commander 11.50 beta 1, please check it!
14.06.24 Fixed: Unpack from multiple archives, target exists, overwrite option "Auto-rename target files": There was a maximum of 1000 supported existing target files (32/64)
Author of Total Commander
https://www.ghisler.com
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50386
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Unzip files breaks

Post by *ghisler(Author) »

Could someone test this, please?
1. Download the following 7zip archive containing 2000 small zip files (all identical):
https://www.totalcommander.ch/testfiles/2000zips.7z
2. Unpack them all to an empty directory with the following option UNCHECKED: Unpack each archive to a separate subdir
3. Go to another empty directory in the other panel
4. Select all the 2000 ZIP archives
5. Press Alt+F9
6. Again make sure that the following option is UNCHECKED: Unpack each archive to a separate subdir
7. Click OK
8. When asked whether you want to overwrite, choose "More options..." and then "Auto-Rename target files."

Expected results:
Total Commander 11.03 would be slow and stop at file 1001.
Total Commander 11.50 is much faster and unpacks/renames all 2000 files.
Author of Total Commander
https://www.ghisler.com
User avatar
funkymonk
Senior Member
Senior Member
Posts: 491
Joined: 2013-12-04, 09:56 UTC

Re: Unzip files breaks

Post by *funkymonk »

TC 11.50b4 x32 dark @ Win10

Here, TC simply closes/crashes right after step "7. Click OK".
The overwrite question from step 8 does not even appear.
However, after the crash there is a "test.txt" file in the target folder (6 bytes, correct content) -- probably the one from the first zip that was unpacked.
User avatar
funkymonk
Senior Member
Senior Member
Posts: 491
Joined: 2013-12-04, 09:56 UTC

Re: Unzip files breaks

Post by *funkymonk »

TC 11.50b4 x32 dark @ Win10

UPDATE: Seems to work with a fresh ini. I have to do more testing to find the problem with my customized TC.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50386
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Unzip files breaks

Post by *ghisler(Author) »

Do you us an external zip unpacker?
Could you send me your wincmd.ini?
Author of Total Commander
https://www.ghisler.com
User avatar
white
Power Member
Power Member
Posts: 5743
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: Unzip files breaks

Post by *white »

ghisler(Author) wrote: 2024-11-06, 08:19 UTC Expected results:
Total Commander 11.03 would be slow and stop at file 1001.
Total Commander 11.50 is much faster and unpacks/renames all 2000 files.
Confirmed, but what is so special about the number 12? Do the test with 12 zip files and see what happens.
User avatar
funkymonk
Senior Member
Senior Member
Posts: 491
Joined: 2013-12-04, 09:56 UTC

Re: Unzip files breaks

Post by *funkymonk »

Sorry for the confusion.

Code: Select all

14.06.24 Fixed: Unpack from multiple archives, target exists, overwrite option "Auto-rename target files": There was a maximum of 1000 supported existing target files (32/64)
seems to work properly now.

The problem I had was with a specific plugin. I have reported the problem here: viewtopic.php?p=463275#p463275
User avatar
white
Power Member
Power Member
Posts: 5743
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: Unzip files breaks

Post by *white »

funkymonk wrote: 2024-11-06, 12:32 UTC seems to work properly now.
So, it does not skip number 12 when you test it?
User avatar
funkymonk
Senior Member
Senior Member
Posts: 491
Joined: 2013-12-04, 09:56 UTC

Re: Unzip files breaks

Post by *funkymonk »

white wrote: 2024-11-06, 12:35 UTC
funkymonk wrote: 2024-11-06, 12:32 UTC seems to work properly now.
So, it does not skip number 12 when you test it?

Uh! Right.
When unpacking 0001.zip to 0012.zip I get

Code: Select all

test.txt
test (2).txt
...
test (11).txt
test (13).txt
It seems 0012.zip is unpacked but the wrong number is used for the unpacked file...

It's the same for unpacking all 2000 files. The last one is "test (2001).txt" and "test (12).txt" is missing.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50386
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Unzip files breaks

Post by *ghisler(Author) »

It's happening when TC switches from checking each file individually for presence to switching to a list approach. I will check why one number is skipped.
Author of Total Commander
https://www.ghisler.com
User avatar
white
Power Member
Power Member
Posts: 5743
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: Unzip files breaks

Post by *white »

HISTORY.TXT wrote: 08.11.24 Fixed: Overwrite option "Auto-rename target files": index (12) was skipped (32/64)
Tested OK using TC 11.50b6 32-bit and 64-bit.

2ghisler(Author)
What technique did you use to speed up the process with this option ("Auto-rename target files") and with the other option ("Auto-rename copied")?
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50386
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Unzip files breaks

Post by *ghisler(Author) »

TC tries to create the first 10 or so copies directly, with option "fail if exists". Then it switches to reading the directory list and checking which would be the next unused name. I'm using this mixed strategy because usually you only have 1 or 2 duplicates, then it's faster to just try to create the new file. Only special cases like the one above would create 100s of duplicates.
Author of Total Commander
https://www.ghisler.com
User avatar
white
Power Member
Power Member
Posts: 5743
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: Unzip files breaks

Post by *white »

ghisler(Author) wrote: 2024-11-13, 14:51 UTC Then it switches to reading the directory list and checking which would be the next unused name.
And you do that 1 time only or with each next file?
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50386
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Unzip files breaks

Post by *ghisler(Author) »

Each file is handled separately. I have to re-read the directory each time because the directory may be changed by other programs in the background. It's still sufficiently fast.

Moderator message from: ghisler(Author) » 2024-11-14, 07:59 UTC

Moved to fixed bugs
Author of Total Commander
https://www.ghisler.com
User avatar
white
Power Member
Power Member
Posts: 5743
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: Unzip files breaks

Post by *white »

ghisler(Author) wrote: 2024-11-14, 07:59 UTC Each file is handled separately. I have to re-read the directory each time because the directory may be changed by other programs in the background.
This seems highly inefficient. Wouldn't it be better to switch back to the first method, once the directory is read? Perhaps only try the next number before re-reading the whole directory again?
Post Reply