cm_SyncChangeDir - Logic of suspension

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

Moderators: white, Hacker, petermad, Stefan2

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

Re: cm_SyncChangeDir - Logic of suspension

Post by *ghisler(Author) »

I disagree, that was exactly the reason why the suspension was added.
For example:
Left:
c:\photos\
c:\photos\misc
c:\photos\Castles
c:\photos\Castles\misc
Right:
d:\
d:\misc

Now the user goes to c:\photos\ and d:\ and then double clicks on "Castles" on the left.
Since it doesn't exit on the right, the sync dir change function gets suspended.
But you argue that there is a directory "misc" in castles, so the function should not be suspended, although it's a different kind of "misc"?
Author of Total Commander
https://www.ghisler.com
Fla$her
Power Member
Power Member
Posts: 2318
Joined: 2020-01-18, 04:03 UTC

Re: cm_SyncChangeDir - Logic of suspension

Post by *Fla$her »

ghisler(Author) wrote: 2023-11-02, 14:15 UTC although it's a different kind of "misc"?
What does "different kind" mean? I wrote about different types, and you once again give an example with one type (simple folders).
Overquoting is evil! 👎
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: cm_SyncChangeDir - Logic of suspension

Post by *ghisler(Author) »

The same example works with for example SFTP, then it would be 0:\misc.
What does "different kind" mean?
The first would be for miscellaneous photos, and the second for miscellaneous castle photos.
Author of Total Commander
https://www.ghisler.com
User avatar
white
Power Member
Power Member
Posts: 4623
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: cm_SyncChangeDir - Logic of suspension

Post by *white »

I think Fla$her is talking about the This PC (My Computer) folder (cm_OpenDrives). User profile folders have been removed from This PC in Windows 11 22H2. So I think his argument is that since there can't be folders in this virtual folder, cm_SyncChangeDir should be smart about it and see This PC as an intermediate folder and don't suspend synchronization. However, in older Windows versions (and by adding registry entries), there can be folders in the This PC folder.
Fla$her
Power Member
Power Member
Posts: 2318
Joined: 2020-01-18, 04:03 UTC

Re: cm_SyncChangeDir - Logic of suspension

Post by *Fla$her »

ghisler(Author) wrote: 2023-11-02, 14:57 UTCThe same example works with for example SFTP, then it would be 0:\misc.
Good. SFTP has the same local folders, everything is clear there.
But let's say I have an open C:\Program Files and \\\Registry\. After enabling the mode and entering \\\Registry\HKEY_CURRENT_USER\Software\, a suspension is in effect, as a result, I have to run cm_SyncChangeDir twice to enable the mode.
But worse, when the suspension continues, when I go to the list of plugins and select another plugin, for example Virtual Panel, Temporary Panel, etc. Why do we need it here?
Or on the left I open cd %$PERSONAL%, and on the right cd ::{450D8FBA-AD25-11D0-98A8-0800361B1103}. After exiting to the desktop on the left, folders are changed from both sides, but after entering Enter into "My Computer", suspension is enabled, although this is not even connected with the chain of paths in any way.
At the same time, when I switch to another drive in different ways, there is no such problem, suspension doesn't turn on.
Last edited by Fla$her on 2023-11-02, 15:59 UTC, edited 1 time in total.
Overquoting is evil! 👎
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: cm_SyncChangeDir - Logic of suspension

Post by *ghisler(Author) »

Maybe the suspend option just isn't for you? Have you tried using just SyncChangeDirMode=1 instead? It never turns off or suspends the function, it just changes dirs on the other side when the two dirs match (now also when going up). It has the above described side effect that it would go to c:\photos\Castles\misc and d:\misc from their parents which SyncChangeDirMode=5 tries to avoid.
Author of Total Commander
https://www.ghisler.com
Fla$her
Power Member
Power Member
Posts: 2318
Joined: 2020-01-18, 04:03 UTC

Re: cm_SyncChangeDir - Logic of suspension

Post by *Fla$her »

2ghisler(Author)
I know how =1 works, and I use it too. But read about what I'm writing above. You could have left the suspend when changing drives, but you didn't.
Why not improve it in other places as well?
Overquoting is evil! 👎
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: cm_SyncChangeDir - Logic of suspension

Post by *ghisler(Author) »

You could have left the suspend when changing drives
That's exactly what happens when you change drives via Alt+F1/F2, drive bar, or bookmarks. It doesn't happen when you go via virtual folder "Computer" because that's going up/down levels like changing directories.
Author of Total Commander
https://www.ghisler.com
Fla$her
Power Member
Power Member
Posts: 2318
Joined: 2020-01-18, 04:03 UTC

Re: cm_SyncChangeDir - Logic of suspension

Post by *Fla$her »

Yes, I see that with ShowParentDirInRoot=1, the transition from the root to the drive list by Enter on [..] has a suspension. But what's the point if there is a drive change (no matter how)? It's the same with changing virtual desktop folders. Why is there a suspension?
Overquoting is evil! 👎
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: cm_SyncChangeDir - Logic of suspension

Post by *ghisler(Author) »

As I wrote, going up/down without an equivalent parent on the other side causes a suspension - there is none when you have the same drive on both sides. The reason for the suspension is that once you are in the list of drives on both sides, you can't return to where you were when the drive on the two sides was different, e.g. c:\ and d:\, go up -> "This PC" on both sides, then you could only go down to the SAME drive on both sides.
Author of Total Commander
https://www.ghisler.com
Fla$her
Power Member
Power Member
Posts: 2318
Joined: 2020-01-18, 04:03 UTC

Re: cm_SyncChangeDir - Logic of suspension

Post by *Fla$her »

is that once you are in the list of drives on both sides
"This PC" on both sides
I originally wrote about situations when there are different types of folders on both sides. I.e. it makes no sense to compare paths when, for example, there is a simple folder in one panel, and a virtual folder/wfx plugin is changed in the other and the mode is blocked.
Overquoting is evil! 👎
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: cm_SyncChangeDir - Logic of suspension

Post by *ghisler(Author) »

It looks like we turn in circles here without getting any advancements.

See my reply above why it can make sense to use this function with a normal folder and for example an SFTP folder.
Author of Total Commander
https://www.ghisler.com
Fla$her
Power Member
Power Member
Posts: 2318
Joined: 2020-01-18, 04:03 UTC

Re: cm_SyncChangeDir - Logic of suspension

Post by *Fla$her »

It's not my fault. See my answer after SFTP.
Overquoting is evil! 👎
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: cm_SyncChangeDir - Logic of suspension

Post by *ghisler(Author) »

You mean this?
But let's say I have an open C:\Program Files and \\\Registry\. After enabling the mode and entering \\\Registry\HKEY_CURRENT_USER\Software\, a suspension is in effect, as a result, I have to run cm_SyncChangeDir twice to enable the mode.
It's the same problem, the user may have a local directory HKEY_CURRENT_USER\Software with which he wants to compare the registry keys. Total Commander cannot "know" when a local equivalent makes sense and when it doesn't.
Author of Total Commander
https://www.ghisler.com
Post Reply