I already took care of that in purgeOldThumbnails(). I didn't do the same in purgeThumbList() because you don't inherently know that $files is *all* the files in $dir.
Oh, when *I* wrote purgeThumbList(), I *did* know that $files is *all* the files in $dir. :-) Of course,neither did I document it that way, and who knows, it might be useful to have those semantics, so I'll back that patch out.
See r96392.
In the future, if you mention the revision you're following up in your commit summary (by saying "r123"), it will automatically link the two and any commenters will be notified.