The plan is to make it more robust, so when the directories break, it'll do the smart thing and recreate them. This reduces the chance of zebra indexing breaking because someone was playing around in the file system. Note that it'll also force a full rebuild when it notices that directories are missing.
Created attachment 2630 [details] [review] proposed patch
Created attachment 2631 [details] [review] proposed patch Fixes a warning from the previous one.
Patch pushed, please test