The problem is that the lock function tries to create the directory in an endless loop when it doesn't exist and can't be created which is imho a bad idea. The indexer lock uses the same loop. The problem is now that the id of the page is used in the directory path without escaping it, thus the path can contain ":" which is not allowed in filenames on windows, thus that directory can't be created and the indexer runs in an endless loop. I've fixed this by using the md5sum of the id in
d6a4a040 . I'm not sure if we should change that while loop. I can't really see the sense of that loop because when everything works it will end after at most two iterations (unless the lock file is created and removed within about 50 micro seconds - but when the subscription mails for a page have already been sent by another indexer call they don't need to be resent 50 micro seconds later) which could also be handled by a structure like
if (is_dir($lock) && time()-@filemtime($lock) > 60*5) {
@rmdir($lock);
}
if (!@mkdir($lock,$conf['dmode'])) {
return false;
}
If you want to keep the loop I think we should at least add a maximum of e.g. 10 tries.