LLDir has several bits of broken and unused functionality that need cleanup:
- The getRandomFileInDir function is not used anywhere in our source base and I can't even think of a valid use for it, so it should be deleted entirely.
- The getNextFileInDir function takes a wrap parameter that is never true; it complicates the code for no reason and should be eliminated, along with all the conditionals that use it.
- The getNextFileInDir restart code (restart when you ask for a different directory?) should be tested and if it doesn't work right, be made to work right.
It's cross-platform code, so lldir, as well as lldir_mac, lldir_windows, and lldir_linux have to be fixed. There's also code in tools and in the simulator, so changes need to be checked with a server dev to propagate them. Consequently, this part must be done by a Linden developer.