Deleting folders in ZIP during Synchronization

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

Moderators: white, Hacker, petermad, Stefan2

Post Reply
Peter_Pan_A
Junior Member
Junior Member
Posts: 9
Joined: 2008-08-02, 07:22 UTC
Location: Bulgaria

Deleting folders in ZIP during Synchronization

Post by *Peter_Pan_A »

Hello,

I do often use the Synchronize Dirs command.
If there is a ZIP file on the Right panel then it happens very often - some folders/directories (missing in the left panel) are not being deleted from the ZIP file. Originally they had files into them, which have been deleted successfully with this synchronization. Unfortunately the already empty folders are left un-deleted.
I have to do several other synchronizations (pressing the Sync button) - in every synchronization some more folders are being deleted - until all folders are erased and both panels are the same.

P.S. This has been a problem since v.10. Now it really troubles me and I decided to report :?
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Deleting folders in ZIP during Synchronization

Post by *ghisler(Author) »

How exactly do you delete them? If I use asymmetric mode and a folder is marked for deletion, it does get deleted even if it contained files.
Author of Total Commander
https://www.ghisler.com
Peter_Pan_A
Junior Member
Junior Member
Posts: 9
Joined: 2008-08-02, 07:22 UTC
Location: Bulgaria

Re: Deleting folders in ZIP during Synchronization

Post by *Peter_Pan_A »

Yes, I do use Asymmetric mode, with Empty directories and Subdirs also activated. The problem happens with Subdirs, unfortunately not every time.

I will be careful with my next Sync and try to give you an example.
Peter_Pan_A
Junior Member
Junior Member
Posts: 9
Joined: 2008-08-02, 07:22 UTC
Location: Bulgaria

Re: Deleting folders in ZIP during Synchronization

Post by *Peter_Pan_A »

Hello,

What am I doing in my practice: Synchronizing a directory with older variants (which I have ZIPed) and thus keeping track of changes.
- The original directory (D1) has been ZIPed to "Z1" days ago. During my work D1 has changed its contents to D2.
- I open the directory D2 in the left pane and the old ZIPed variant Z1 in the right.
- I want to update the ZIP Z1 (right folder) to Z2, which must be the same as the contents of the left folder (D2) so I do a Synchronization between them.

Please find files:
(sending them personally)

Herein I am sending 2 files:
"Original Dir.zip" - this one has to be extracted into one folder (Name: Default) and be opened in the left pane for the "Synchronize dir" command. It has the contents of the mentioned D2 folder.

"Original ZIP.zip" - this one has NOT to be extracted, but opened as ZIP in the right pane for the "Synchronize dir" command. It has the contents of the mentioned Z1.

As a result of a "Compare" I get two strange results:
- there are 23 files in the right pane which are shown as to be copied to the left - why this?
- If I try to find these 23 files - there are no files with the "right to left" arrow, only files to be deleted from the right folder ?

When Synching I switch OFF "copying to the left folder" (as I do want the right pane to be exactly as the left). As a result there are 22/23 files in the right folder, which are stated as to be deleted ?
I do a second Synch and some of these left over files are being deleted. I do another Sync ... and so on until all left over files in the right pane are deleted.
Now I have the Right ZIP (Z2) exactly the same as the Left folder (D2).

I hope I have explained the problem :)
User avatar
Dalai
Power Member
Power Member
Posts: 9393
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: Deleting folders in ZIP during Synchronization

Post by *Dalai »

Peter_Pan_A wrote: 2023-12-08, 06:59 UTC- there are 23 files in the right pane which are shown as to be copied to the left - why this?
That's how asymmetric mode workds. It's documented in TC help:
Blue: Copy from right to left, or delete on the right side (asymmetric mode, in this case, the file has a cross symbol in the middle).
It's not just the font color that tells the user how files will be handled but also the icon in the middle.
When Synching I switch OFF "copying to the left folder" (as I do want the right pane to be exactly as the left).
That's probably the reason why there isn't deleted anything. The dir sync operates only on files that are shown in the list. If you switch "Files to copy from right to left" off, it won't copy anything in normal mode and it won't delete anything in asymmetric mode. The latter is what I'm guessing/concluding because I don't use that mode.

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Deleting folders in ZIP during Synchronization

Post by *ghisler(Author) »

I found out when this happens: When you delete all files from a directory which is at least two levels deep, then the parents don't get deleted, e.g. deleting
dir1\dir2\file
would delete
dir1\dir2
but not
dir1
Author of Total Commander
https://www.ghisler.com
JOUBE
Power Member
Power Member
Posts: 1477
Joined: 2004-07-08, 08:58 UTC

Re: Deleting folders in ZIP during Synchronization

Post by *JOUBE »

ghisler(Author) wrote: 2023-12-18, 10:57 UTC I found out when this happens: When you delete all files from a directory which is at least two levels deep, then the parents don't get deleted, e.g. deleting
dir1\dir2\file
would delete
dir1\dir2
but not
dir1
This is a general problem of the sync tool and does not only affect zip files. It's been around forever. It should be fundamentally fixed/changed/worked on.

Joube
Peter_Pan_A
Junior Member
Junior Member
Posts: 9
Joined: 2008-08-02, 07:22 UTC
Location: Bulgaria

Re: Deleting folders in ZIP during Synchronization

Post by *Peter_Pan_A »

ghisler(Author) wrote: 2023-12-18, 10:57 UTC I found out when this happens: When you delete all files from a directory which is at least two levels deep, then the parents don't get deleted, e.g. deleting
dir1\dir2\file
would delete
dir1\dir2
but not
dir1
Exactly, I noticed the same.
I think - in previous versions of TC (as far as I remember in v.9) there has been no problem like this.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Deleting folders in ZIP during Synchronization

Post by *ghisler(Author) »

This is a general problem of the sync tool and does not only affect zip files.
Not true. I created a file dir1\dir2\file on the right side and none of the 3 existing on the left, and all 3 were selected for deletion and were deleted in the synchronize step.
Author of Total Commander
https://www.ghisler.com
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Deleting folders in ZIP during Synchronization

Post by *ghisler(Author) »

This should be fixed in Total Commander 11.03 RC1, please check it!
Author of Total Commander
https://www.ghisler.com
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Deleting folders in ZIP during Synchronization

Post by *ghisler(Author) »

The user who reported the bug, Peter_Pan_A, has confirmed via e-mail that the bug has been fixed.

Moderator message

Moved to fixed bugs
Author of Total Commander
https://www.ghisler.com
Post Reply