Resupport .\...\ in exclusions within the sync-tool

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

Moderators: Hacker, petermad, Stefan2, white

JOUBE
Power Member
Power Member
Posts: 1664
Joined: 2004-07-08, 08:58 UTC

Resupport .\...\ in exclusions within the sync-tool

Post by *JOUBE »

Please resupport .\...\ in exclusions within the sync-tool, as it works over the years and is OS compatible.

Otherwise many of my customers I support have to change (and restest!) many automated sync configurations, or can not update to version 11.50.

I do not understand why this was suddenly removed: What is the reason for it?

.\...\ are the usual OS conventions and \...\ is unlogical for that relative path.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50386
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Resupport .\...\ in exclusions within the sync-tool

Post by *ghisler(Author) »

Could you provide an example of what worked before and doesn't work now? I don't remember supporting ".\...\" anywhere, please give me more details.
Author of Total Commander
https://www.ghisler.com
User avatar
Dalai
Power Member
Power Member
Posts: 9943
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: Resupport .\...\ in exclusions within the sync-tool

Post by *Dalai »

What kind of path is ".\...\" supposed to be? I'd understand ".\..\" (one dot less) which means one level up, but three dots? CMD just stays in the current directory when trying to change dir to something like this.
#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
white
Power Member
Power Member
Posts: 5743
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: Resupport .\...\ in exclusions within the sync-tool

Post by *white »

I assumed he meant .\<some text>\
JOUBE
Power Member
Power Member
Posts: 1664
Joined: 2004-07-08, 08:58 UTC

Re: Resupport .\...\ in exclusions within the sync-tool

Post by *JOUBE »

white wrote: 2024-11-15, 11:35 UTC I assumed he meant .\<some text>\
Yes: <some text> = folder(s)
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50386
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Resupport .\...\ in exclusions within the sync-tool

Post by *ghisler(Author) »

Yes: <some text> = folder(s)
Do you mean that a search like this:
*.txt .\subdir\
should behave like
*.txt \subdir\
does now?
Author of Total Commander
https://www.ghisler.com
JOUBE
Power Member
Power Member
Posts: 1664
Joined: 2004-07-08, 08:58 UTC

Re: Resupport .\...\ in exclusions within the sync-tool

Post by *JOUBE »

There are many many saved sync configurations for the sync tool (here and at the customers), these are called via usercmd.ini:

Code: Select all

....
[em_Sync61]
cmd=%COMMANDER_EXE% /S=S:="SyncKonfigurationenName61"
[em_Sync62]
cmd=%COMMANDER_EXE% /S=S:"SyncKonfigurationenName62"
.....

Code: Select all

SyncKonfigurationenName61_L=c:\Scripts\
SyncKonfigurationenName61_R=r:\Scripts\
SyncKonfigurationenName61_Wcs=*.* | Logs\  
vs.
SyncKonfigurationenName61_Wcs=*.* | .\Logs\  
vs.
SyncKonfigurationenName61_Wcs=*.* | \Logs\  
SyncKonfigurationenName61_Flags=17|61|6
That's what it's about, it's about the - relative - exclusions:

For Logs\, all directories Logs are excluded. This is ok.

For .\Logs\, up to now (up to 11.50B3) only the directory c:\scripts\logs\ was excluded - as requested (but all other logs\ such as c:\scripts\daily\logs were not - as requested.)

.\Logs\ because it is a relative path (it refers to c:\scripts\logs)

Instead, the dot can no longer be used:

From now on (11.50B4 or B5), \Logs\ should indicate a relative path. But that is completely illogical, because for example "cd \Log\" always refers to the main directory and never to a subdirectory such as c:\scripts\logs

This is a very bad change (probably due to a side effect), because it is not operating system compliant and also illogical. My customers will have to be advised against 11.50, because we will be forced to change many, many configurations and all of them will have to be retested.
User avatar
Dalai
Power Member
Power Member
Posts: 9943
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: Resupport .\...\ in exclusions within the sync-tool

Post by *Dalai »

An exclusion like

Code: Select all

\somedir
can be referred to as the root of the directory tree to be synched, not the drive root. I guess you've never used rsync before where this is the usual and perfectly normal way to specify an exclusion (or even an inclusion).

Anyway, I'm not sure whether or not .\somedir was ever officially supported when it comes to directory exclusions in the sync function. If it wasn't it's just luck on your part that it worked this long. In case TC stays that way, it should be no problem to change the sync profiles, e.g. via search & replace in Notepad++ for example.
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
JOUBE
Power Member
Power Member
Posts: 1664
Joined: 2004-07-08, 08:58 UTC

Re: Resupport .\...\ in exclusions within the sync-tool

Post by *JOUBE »

Whether rsync handles this in accordance with the operating system or not is irrelevant. One can expect that the TC does it better and behaves in accordance with the operating system.

Does rsync at least support .\folder in addition to \folder, or is that totally messed up?
User avatar
Dalai
Power Member
Power Member
Posts: 9943
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: Resupport .\...\ in exclusions within the sync-tool

Post by *Dalai »

JOUBE wrote: 2024-11-19, 09:44 UTCDoes rsync at least support .\folder in addition to \folder, or is that totally messed up?
I have no idea. Back then I read the rsync mangpage to find out how to specify exclusions and inclusions and used what was described there. /somedir/ specifies a directory named "somedir" in the sync root, and "somedir/" specifies a directory anywhere within the sync tree. There are some peculiarities regarding a trailing slash, but let's not get carried away here because this doesn't matter in regards to TC.
#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
white
Power Member
Power Member
Posts: 5743
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: Resupport .\...\ in exclusions within the sync-tool

Post by *white »

JOUBE wrote: 2024-11-18, 11:08 UTC For .\Logs\, up to now (up to 11.50B3) only the directory c:\scripts\logs\ was excluded - as requested (but all other logs\ such as c:\scripts\daily\logs were not - as requested.)

.\Logs\ because it is a relative path (it refers to c:\scripts\logs)
Actually, I don't think it makes sense if it refers to c:\scripts\logs. That would mean "." is not relative, but rather a fixed folder. When it is relative the value is determined at the moment it is processed, not beforehand.
JOUBE wrote: 2024-11-18, 11:08 UTC Instead, the dot can no longer be used:
I can confirm that the behavior has changed and is now inconsistent with normal search. But I think using "." in traverse filters was probably never supported and a side effect. If .\Logs\ would be supported, should logs\.\ be supported as well? And what would behavior should it do?
JOUBE wrote: 2024-11-18, 11:08 UTC From now on (11.50B4 or B5), \Logs\ should indicate a relative path. But that is completely illogical, because for example "cd \Log\" always refers to the main directory and never to a subdirectory such as c:\scripts\logs
The behavior of \Logs\ in the sense you are talking about, hasn't changed and it doesn't indicate a relative path. What you call a relative path is not a relative path, but a fixed path. The expression Logs\ indicates a relative path. And logically, .\Logs\ should indicate a relative path too. But "." is not supported and can be implemented anyway Ghisler chooses. That's why I think that he will change it back to the old behavior to solve your issue.
JOUBE
Power Member
Power Member
Posts: 1664
Joined: 2004-07-08, 08:58 UTC

Re: Resupport .\...\ in exclusions within the sync-tool

Post by *JOUBE »

white wrote: 2024-11-19, 11:22 UTC I can confirm that the behavior has changed
....
That's why I think that he will change it back to the old behavior to solve your issue.
I ask for it.

Because I will not make the corresponding changes in Tc-inis using notepad/npp search&replace on the customer side and would of course have to test everything again in detail. That is certainly not in the spirit of a professional tool.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50386
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Resupport .\...\ in exclusions within the sync-tool

Post by *ghisler(Author) »

Thanks for the explanation, I will handle .\folder the same as \folder now.
Author of Total Commander
https://www.ghisler.com
JOUBE
Power Member
Power Member
Posts: 1664
Joined: 2004-07-08, 08:58 UTC

Re: Resupport .\...\ in exclusions within the sync-tool

Post by *JOUBE »

Thank you very much.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50386
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Resupport .\...\ in exclusions within the sync-tool

Post by *ghisler(Author) »

This should work now in beta 7, please test it!
17.11.24 Added: Find files: Treat .\ at the start of a search term the same as \, e.g. *.txt | .\subdir1\ excludes files in directory "subdir1" (32/64)
Author of Total Commander
https://www.ghisler.com
Post Reply