|
Post by George on Jun 27, 2021 10:08:22 GMT -5
Robert: The code is fine, it's the collating sequence that's getting in the way. If, like me, you have filenames starting with special characters ($ _ #) etc. they mess things up.
The locate search finds the 1st >= match (In Name+ order)
Now perhaps the search could skip leading special characters, but then that would effectively mean the list is no longer sorted properly, and a >= search is faulty.
Another option is to make the search only for =, but that then means you can have a not-found condition.
'tis a conundrum.
George
|
|
|
Post by George on Jun 27, 2021 11:31:16 GMT -5
Duh! The brain isn't working too well today. That was an obvious one. I've changed the compares to use StrCmpLogicalW the same as the sort rooutine does. Much better. George SPFLite25.exe (544 KB)
|
|
|
Post by George on Jun 27, 2021 15:15:43 GMT -5
Wish there were some way to look ahead and avoid this kind of 'percolation' error, but it's just so hard to anticipate and/or remember all the other things that might be impacted by a change. Like this one with the sorting of FM lists.
George
|
|
|
Post by George on Jun 28, 2021 8:28:49 GMT -5
And even harder for something whose code has just grown like topsy for 15 years.
George
|
|