Thanks for looking into this.
I agree with the direction of your solution: it needs something to limit the MOF search, then all will be ok and no damage will be caused. It might even be worth putting up a warning to users in the pre-test checks you provide that such mount points are potentially hazardous to tools that use "indiscriminate" searching to do automated repair work
. Your tool won't be the only one in the world to fall foul of this. Indeed if the mount point is recursive (one of mine was at one point: the mount point was to the drive on which the mount point resided) then a tool may never even complete - until it eventually crashes due to ridiculously long recursive path names.
You can test the problem scenario by using C:\Windows\System32\diskmgmt.msc to set up NTFS Path mount points to drives such that these paths are then folders on the C: drive. I actually have to do this on my system because I sometimes have too many drives (many of them are USB) to provide drive letters for, and this is sometimes the only way I can mount such drives consistently to fixed locations.
Since encountering this problem I have decided that 'C' is perhaps not the best drive to use for such mount-point folders.
Indeed, doing so is probably asking for trouble. Hence my suggestion that detection and warning users in your "Pre-Scan" checking suite might be a useful addition to the tool: Perhaps with a suggestion that the user only ever uses a non-OS drive for such folder-based mount points.