Page 1 of 1
ColorFiltering exact paths
Posted: 16 Jun 2015 01:03
by SkyFrontier
v13.10.0001 - 2013-10-10 20:45
...
! Color Filters: Name filters stated as slashed paths never matched
anywhere. Fixed. Now you can pass "D:\Test\"(or "D:\Test") as a
filter and it will color this one path.
How do I make this work as stated on latest versions...?
Re: ColorFiltering exact paths
Posted: 17 Jun 2015 19:32
by kunkel321
Interesting. I was just experimenting.
I made an empty folder, which is,
Then made the corresponding Color Filter definition (without the ending slash).
It matched the folder and also matched a file in my C drive that happened to be there, "C:\test.xml"
But then I put the slash at the end and it still matches both.
The ending slash should make it NOT match the xml file, correct?

Re: ColorFiltering exact paths
Posted: 17 Jun 2015 20:41
by TheQwerty
This is actually working as designed* based on this change:
Code: Select all
v13.20.0011 - 2013-11-09 13:42
. . .
* Color Filters: Now Name and Dir patterns support Loose Match, i.e.
wildcards (*) are internally auto-added left and right of a
pattern if no wildcards (* or ?) are contained in the pattern. So
"cat" will now match "wildcat.txt"; before you needed to state
"*cat*".
FYI, this is in analogy to Visual Filters which support this since
20060830.
Prefixing the pattern with a '*' makes it work as you desire, because this disables the loose matching.
So to just color
C:\Test you want a pattern of
*C:\Test
EDIT: Though XY might be able to more smartly handle a trailing '\' in these cases. /edit.
* It's arguable whether it's a good design decision. As it stands now the rules are simpler and thus more easily documented. Perhaps it would be better if the loose match also checked for ':\' before surrounding the pattern in wildcards? ('\' only would impact '\test\') In any case it might help for the examples to include:
Code: Select all
C:\Windows -> matches C:\Windows, all items that are located in C:\Windows, and also C:\WindowSill and its contents. (Same as *C:\Windows*)
*C:\Windows -> matches C:\Windows only.
Re: ColorFiltering exact paths
Posted: 17 Jun 2015 22:03
by SkyFrontier
Thanks, TQ.
Traversed history.txt high and low but couldn't find a way to achieve that.