?[8.50b3]Saved search is not visible

The behaviour described in the bug report is either by design, or would be far too complex/time-consuming to be changed

Moderators: Hacker, petermad, Stefan2, white

ferhat
Junior Member
Junior Member
Posts: 54
Joined: 2013-09-03, 06:29 UTC

Post by *ferhat »

I know that. But this is not the actual bug.

The bug is:
When TC finds such an invalid entry it is not able to show further valid entries like in the example below. In my example below TC will never show the valid entries "TEST" and "FOO".
It seems that after the first invalid entry all further entries are skipped.

[searches]
=A_SearchFor=
A_SearchIn=
A_SearchText=
A_SearchFlags=

TEST_SearchFor=
TEST_SearchIn=
TEST_SearchText=
TEST_SearchFlags=

FOO_SearchFor=
FOO_SearchIn=
FOO_SearchText=
FOO_SearchFlags=

In my opinion TC must ignore invalid entries but it has to read and show further valid entries like "TEST" and "FOO"
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

If TC uses system API functions to read INI, I can describe why it ignores further entries. GetPrivateProfileString function returns list of section entries with null character as separator, and with double null character at the end. When empty parameter exists, it looks like two null characters together, i.e. just like the end of list.
I think the only thing TC can do here is to check if overall returned buffer is not processed yet (function returns number of written characters).
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50541
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Yes it does - GetPrivateProfileString and GetPrivateProfileSection. I will leave it as it is for now, because this invalid entry was created by an error which is now fixed. Therefore no new such entries should appear in the future.
Author of Total Commander
https://www.ghisler.com
Post Reply