Page 1 of 1

Search glitch with a dot

Posted: 12 Jul 2015 19:28
by zer0
I believe that there is a glitch when it comes to search with presence/absence of a single dot/period/full stop making all the difference. To reproduce:

1. Create a structure of folders in a desired location where the first couple of words are the same. For example, like so:

Code: Select all

Star.Trek.First.Contact
Star.Trek.Generations
Star.Trek.III.The.Search.For.Spock
Star.Trek.IV.The.Voyage.Home
Star.Trek.Nemesis
Star.Trek.The.Motion.Picture
Star.Trek.The.Wrath.Of.Khan
Star.Trek.V.The.Final.Frontier
Star.Trek.VI.The.Undiscovered.Country
Star.Trek.Into.The.Darkness
2. While in that same location, after creating those folders, do a normal search for "star.trek". Outcome: the search shows all those folders.
3. Now do a search for "star.trek." -- notice the dot/period at the end of the string is added at the end. Outcome: the folders you've just created are miraculously not found.

This seems like a straight forward bug to me: the dot/period is present so, whether it is included or not, should not matter. I have searched the forum but found no threads on a similar subject -- maybe that search isn't working properly either :lol: -- which seems a bit surprising. Anyway, hopefully when Don comes back from self-imposed exile / holiday / etc, it can be cleared up.

Re: Search glitch with a dot

Posted: 13 Jul 2015 17:41
by TheQwerty
I think it might be a lack of smartness in the young no-extension handling - introduced in v15.00.0520, late April.
Possibly also a conflict with the habits formed by us thanks to XY's auto-wildcarding.


Ending the pattern with a period seems to put find into no-extension mode, where it ignores folders and only finds files which do not have an extension (and match the content before the dot).

In this particular case though the no-extension mode looks rather dumb since it would be impossible for a file named "star.trek" to not have an extension. :whistle:

Surrounding it with wildcards obviously works more like you'd expect ("*star.trek.*") as does making the final period a character class ("star.trek[.]").


I say if the query contains 2+ dots then the no-extension mode should not be enabled.
However, the question then becomes should "star." be a literal or no-extension search? For this I have no answer. :?


EDIT: Similar behavior is likely also seen in Visual Filters, Custom File Icons, and Portable File Associations, since the no-extension syntax was introduced for all of these at the same time.

Re: Search glitch with a dot

Posted: 14 Jul 2015 12:37
by zer0
Thanks for chiming in TheQwerty. I am not a fan of this no-extension behaviour. I appreciate that I can modify the query to produce the expected results, but that should not be necessary when one tries to do a basic search for files/folders that contain a given name. This seems like one of those occasions where XY is trying to be too clever for its own good and is treating normal searches as special. If anything, if a search needs to go into this ninja "no extension" mode, the search string should be pre-/suffixed in a particular manner and. As it stands, ending a search with a dot -- which is fully legitimate -- messes things up quite a bit.

Re: Search glitch with a dot

Posted: 26 Jul 2015 15:04
by admin
Thanks, good find and good analysis. Fix comes:

Code: Select all

    ! Find Files Without Extension: The test for no-extension patterns was not 
      alright. A pattern "Star.Trek." was wrongly seen as a no-extension pattern and 
      hence would never match anything since it also included a dot in the 
      middle. Fixed. Now, the ONLY dot in a pattern has to be the last character 
      to make it a no-extension pattern.
      The same fix has been applied to Visual Filters, Custom File Icons, and 
      Portable File Associations.