4 ms·
Apart from the performance issues, it also prevents a bug. If some files get deleted between the first and the second pass, then you end up with unexpected beha
by linepogl 2mo ago
Apart from the performance issues, it also prevents a bug. If some files get deleted between the first and the second pass, then you end up with unexpected behaviour and probably a crash.
- sltkr 2mo agoThe current implementation has the same race condition: the sampled file may be deleted by the time SHSetUserPicturePath() is called.
- layer8 2mo agoYes, but the the implementation with the additional iteration also has to have extra checks for that iteration, because it can't blindly iterate to the ith file, as there may not be i files anymore. So the implementation gets more complex overall.