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

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
aviasd
Junior Member
Junior Member
Posts: 84
Joined: 2013-07-02, 18:28 UTC
Location: Israel

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

Post by *aviasd »

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...
What will Total commander be like 10 years from now?
Tc 9.51 Final, #351732 Single, Win7x64
User avatar
aviasd
Junior Member
Junior Member
Posts: 84
Joined: 2013-07-02, 18:28 UTC
Location: Israel

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

Post by *aviasd »

Well, after searching the forum a bit, I see this is by design..
+1 for adding this feature on future releases.
What will Total commander be like 10 years from now?
Tc 9.51 Final, #351732 Single, Win7x64
User avatar
Hacker
Moderator
Moderator
Posts: 13052
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

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

Post by *Hacker »

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.
User avatar
aviasd
Junior Member
Junior Member
Posts: 84
Joined: 2013-07-02, 18:28 UTC
Location: Israel

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

Post by *aviasd »

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)
What will Total commander be like 10 years from now?
Tc 9.51 Final, #351732 Single, Win7x64
User avatar
Hacker
Moderator
Moderator
Posts: 13052
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

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

Post by *Hacker »

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.
User avatar
aviasd
Junior Member
Junior Member
Posts: 84
Joined: 2013-07-02, 18:28 UTC
Location: Israel

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

Post by *aviasd »

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.
What will Total commander be like 10 years from now?
Tc 9.51 Final, #351732 Single, Win7x64
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

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

Post by *ghisler(Author) »

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
https://www.ghisler.com
User avatar
aviasd
Junior Member
Junior Member
Posts: 84
Joined: 2013-07-02, 18:28 UTC
Location: Israel

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

Post by *aviasd »

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")
What will Total commander be like 10 years from now?
Tc 9.51 Final, #351732 Single, Win7x64
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

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

Post by *ghisler(Author) »

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
https://www.ghisler.com
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

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

Post by *petermad »

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.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
aviasd
Junior Member
Junior Member
Posts: 84
Joined: 2013-07-02, 18:28 UTC
Location: Israel

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

Post by *aviasd »

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 ?
What will Total commander be like 10 years from now?
Tc 9.51 Final, #351732 Single, Win7x64
User avatar
Hacker
Moderator
Moderator
Posts: 13052
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

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

Post by *Hacker »

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.
Post Reply