[TC 11.51] Editing/repacking a file in .7z may get the file lost

The behaviour described in the bug report is either by design, or would be far too complex/time-consuming to be changed

Moderators: Hacker, petermad, Stefan2, white

Post Reply
User avatar
Guillaume
Member
Member
Posts: 105
Joined: 2003-04-08, 16:51 UTC

[TC 11.51] Editing/repacking a file in .7z may get the file lost

Post by *Guillaume »

  1. Under 7-Zip Packer settings, uncheck [Use internal 7-Zip packer]
  2. Open a 7z (in my case SFX) archive of significant size (the repacking needs to take a while, so make it a solid archive for good measure)
  3. Press [F4] on a file to edit it and confirm
  4. Change something and close the editor (Notepad3 in my case)
  5. Confirm to repack the file
  6. See the 7zg.exe fail, because it can't find the file
  7. The file is now also completely gone from the 7z archive
This does not happen when either [Use internal 7-Zip packer] or [Prefer 7-Zip plugin if installed] are checked.

It seems that when [Prefer 7-Zip plugin if installed] is checked, the TC window is blocked with a Plugin progress dialog until 7zg.exe is done, while this is not the case in the situation above. So, most likely TC doesn't wait for the 7zg.exe process to finish before cleaning up the temp files.
Last edited by Guillaume on 2025-05-05, 16:34 UTC, edited 2 times in total.
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6995
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: [TC 11.51] Editing/repacking a file in .7z may get the file lost

Post by *Horst.Epp »

Not confirmed
For me the edited file is successfully replaced and still valid on the next open of the archive.
Windows 11 Home, Version 24H2 (OS Build 26100.4061)
TC 11.55 RC3 x64 / x86
Everything 1.5.0.1393a (x64), Everything Toolbar 1.5.3.0, Listary Pro 6.3.2.88
QAP 11.6.4.4 x64
User avatar
Guillaume
Member
Member
Posts: 105
Joined: 2003-04-08, 16:51 UTC

Re: [TC 11.51] Editing/repacking a file in .7z may get the file lost

Post by *Guillaume »

2Horst.Epp

I've added some extra info about the type of archive to test with. It's 100% reproducible.
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6995
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: [TC 11.51] Editing/repacking a file in .7z may get the file lost

Post by *Horst.Epp »

Guillaume wrote: 2025-05-05, 16:34 UTC 2Horst.Epp

I've added some extra info about the type of archive to test with. It's 100% reproducible.
Still problem not confirmed
None of [Use internal 7-Zip packer] or [Prefer 7-Zip plugin if installed] is checked in my tests !

Maybe it's version dependent ?
On my system, "C:\Program Files\7-Zip\7zG.exe" is version 24.9.0.0
Windows 11 Home, Version 24H2 (OS Build 26100.4061)
TC 11.55 RC3 x64 / x86
Everything 1.5.0.1393a (x64), Everything Toolbar 1.5.3.0, Listary Pro 6.3.2.88
QAP 11.6.4.4 x64
User avatar
Guillaume
Member
Member
Posts: 105
Joined: 2003-04-08, 16:51 UTC

Re: [TC 11.51] Editing/repacking a file in .7z may get the file lost

Post by *Guillaume »

Holy crap, I get it now.

I didn't fill in a path in the [7-Zip packer:] field (i.e. I didn't change the field at all), because 7zg.exe is already in the path via Scoop anyway... but Scoop does this by adding a single folder to the path variable and adding shims to that folder that in turn start the real executables!

So TC waits for the the shim 7zg.exe to finish, which is immediately after the shim launches the real 7zg.exe. TC then cleans up the temp files while the real 7zg.exe is still busy with its operation...

The problem immediately disappeard after filling in the full path to 7zg.exe.

2Horst.Epp Sorry I wasted your time. Luckily, your question did point me in the right direction by trying out a different version of 7zg.exe by filling in the full path.

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

Re: [TC 11.51] Editing/repacking a file in .7z may get the file lost

Post by *ghisler(Author) »

Not a Total Commander bug.

Moderator message from: ghisler(Author) » 2025-05-07, 10:20 UTC

Moved to will not be changed
Author of Total Commander
https://www.ghisler.com
Post Reply