## cm_SyncChangeDir - Stops working after going to non existing folder on other side

English support forum

Moderators: sheep, Hacker, Stefan2, white

aviasd
Junior Member
Posts: 49
Joined: 2013-07-02, 18:28 UTC
Location: Israel

### cm_SyncChangeDir - Stops working after going to non existing folder on other side

Hi.

When using Sync directory changes (cm_SyncChangeDir - 2600) I noticed that if I go to some folder that does not exist on the right side, and then go back, and continue to go through dirs that exist on both sides, the functionality breaks until I disable/enable it again.

Is this a bug or by design ?

Note: the folders on the left/right side are similiar in folder structure but they are not the same folder...
A glance to the future: What will Total commander be like in 10 years from now?

aviasd
Junior Member
Posts: 49
Joined: 2013-07-02, 18:28 UTC
Location: Israel

### Re: cm_SyncChangeDir - Stops working after going to non existing folder on other side

Well, after searching the forum a bit, I see this is by design..
+1 for adding this feature on future releases.
A glance to the future: What will Total commander be like in 10 years from now?

Hacker
Moderator
Posts: 11530
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

### Re: cm_SyncChangeDir - Stops working after going to non existing folder on other side

aviasd,
Left panel is C:\, right panel is D:\, right panel is active. You activate cm_SyncChangeDir and start browsing:

Code: Select all

1. C:\                       D:\
2. C:\                       D:\FunnyDir\
3. C:\Alpha\                 D:\FunnyDir\Alpha\

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.

aviasd
Junior Member
Posts: 49
Joined: 2013-07-02, 18:28 UTC
Location: Israel

### Re: cm_SyncChangeDir - Stops working after going to non existing folder on other side

Hacker wrote:
2020-01-22, 22:33 UTC

Code: Select all

1. C:\                       D:\
2. C:\                       D:\FunnyDir\
3. C:\Alpha\                 D:\FunnyDir\Alpha\

Hacker,
Even in your example, on 2. the cm_SyncChangeDir would toggle off as I enter D:\FunnyDir but I was refferring to something more simple such as this illustrated behaviour.(Taken from here)
A glance to the future: What will Total commander be like in 10 years from now?

Hacker
Moderator
Posts: 11530
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

### Re: cm_SyncChangeDir - Stops working after going to non existing folder on other side

aviasd,
I understand what you are trying to achieve (and what the video illustrates), however, I am asking how you would precisely define when to resume the synchronous browsing. Just name matching might not be desired, as my example shows.

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.

aviasd
Junior Member
Posts: 49
Joined: 2013-07-02, 18:28 UTC
Location: Israel

### Re: cm_SyncChangeDir - Stops working after going to non existing folder on other side

Hacker,

Well, I have not thought about how to do that, I just described what I wished

Well, one option is to mark the last folder where there were matching folders on left/right and resume the sync browsing when you go back to that folder.

Other option is maybe having some relative average of similiar folders that would reactivate the sync folder as they are found. (i.e more than 50% matching folders)

Another option is flag the root dir as you enable sync browsing and just activate the sync browsing when you go back again to that root dir.

This is just the from the top of my head. (I'm not sure if that is what you were asking though )
Edit: After thinking about it, the thid option is no good, and similiar to the first option, which I think is the most reasonable for common use.
A glance to the future: What will Total commander be like in 10 years from now?

ghisler(Author)
Posts: 39185
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

### Re: cm_SyncChangeDir - Stops working after going to non existing folder on other side

The problem is that if I wouldn't disable it, then going up from the directory which doesn't exist on the other side would (incorrectly) go up on the other side too. Example:

Code: Select all

C:\Alpha\                 D:\FunnyDir\Alpha\
click on "unique" ->
C:\Alpha\unique           D:\FunnyDir\Alpha\
go up ->
C:\Alpha\                 D:\FunnyDir\
I can't just skip one directory change, because the user may go down several levels into unique's subdirs.
Author of Total Commander
http://www.ghisler.com

aviasd
Junior Member
Posts: 49
Joined: 2013-07-02, 18:28 UTC
Location: Israel

### Re: cm_SyncChangeDir - Stops working after going to non existing folder on other side

Couldn't my first suggestion solve this issue ?

Code: Select all

C:\Alpha\                 	D:\FunnyDir\Alpha\
go to "unique" ->C:\Alpha is flagged as the root, sync is paused
C:\Alpha\unique                 D:\FunnyDir\Alpha\
C:\Alpha\unique\unique2         D:\FunnyDir\Alpha\
go up -> (no change because not in root)
C:\Alpha\unique\                D:\FunnyDir\Alpha\
go up -> (still no change )
C:\Alpha\                	D:\FunnyDir\Alpha\
(Now the sync is resumed because back in root)
C:\Alpha\Beta                	D:\FunnyDir\Alpha\Beta


• The "root" is dynamic - the current folder is marked as root the moment the user goes to a unique folder.
• This doesn't count for special cases where the user goes to unique at the left, then switches to the right and goes somwehre else (in that case the option should be toggled off)
The idea is to cover the basic use scenario (from what I saw in the forum):
sync browsing -> maybe go to check something in unique folder/s -> go back -> resume sync browsing

I know this sounds a little "hackish" and not TC's way of doing things, but couldn't we expand on this idea ? (even though it's a minor feature, the forum does mention this a lot and it would make the feature more robust and work "as expected")
A glance to the future: What will Total commander be like in 10 years from now?

ghisler(Author)
Posts: 39185
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

### Re: cm_SyncChangeDir - Stops working after going to non existing folder on other side

One idea would be to store the left and right directories the moment when the cm_SyncChangeDir function turns itself off.

Then check each directory change on the side causing the turning off until these two directories are active again. Once this happens, turn cm_SyncChangeDir back on.

The downside is that this second step may happen much much later, when the user no longer wants to use cm_SyncChangeDir. any suggestions?
Author of Total Commander
http://www.ghisler.com

Power Member
Posts: 9406
Joined: 2003-02-05, 20:24 UTC
Location: Valsted, Denmark
Contact:

### Re: cm_SyncChangeDir - Stops working after going to non existing folder on other side

The downside is that this second step may happen much much later, when the user no longer wants to use cm_SyncChangeDir. any suggestions?
Maybe a timer that could be configured in wincmd.ini, so the user could set cm_SyncChangeDir to automatically be turned off after a desired amount of minutes.
Danish Total Commander Translator
TC 9.5b10 32+64bit on Win XP 32bit, Win 7, 8.1 & 10 (1909) 64bit, 'Everything' 1.4.1.960 (x64)
TC 3.0b16 on Android 6.0
Get: Extended Total Commander Menus | TC Languagebar | PHSM-Calendar

aviasd
Junior Member
Posts: 49
Joined: 2013-07-02, 18:28 UTC
Location: Israel

### Re: cm_SyncChangeDir - Stops working after going to non existing folder on other side

ghisler(Author) wrote:
2020-01-23, 16:00 UTC
The downside is that this second step may happen much much later, when the user no longer wants to use cm_SyncChangeDir. any suggestions?
I would suggest multiple trigger to cancel cm_SyncChangeDir:
• When one of the panes switches to a different drive.
• When the number of component paths of non matching folders reaches a certain threshhold. (also when going upwards in the tree). I.E:

Code: Select all

 c:\Alpha\uniq\1\2\3\          d:\alpha\ -> disable cm_SyncChangeDir
• When changing to a hotdir
• Switching tabs ?
A timer could be an idea, but what if you left Tc for a while and than came back to continue work.. should that be the disable trigger ?
A glance to the future: What will Total commander be like in 10 years from now?

Hacker
Moderator
Posts: 11530
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

### Re: cm_SyncChangeDir - Stops working after going to non existing folder on other side

Christian,
The downside is that this second step may happen much much later, when the user no longer wants to use cm_SyncChangeDir. any suggestions?
Or simply don't cancel it. Instead I'd suggest when cm_SyncChangeDir is active for Alt-Left to also change the other panel back one step and Esc to cancel cm_SyncChangeDir. This way the surprised user would only have to press Alt-Left, Escape.

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.