Deletion of an entire folder within the depth (for example, if the folder depth is 3, deleting a folder <=3), will still fire an event to re-calculate the metadata.
This will recreate the folder again with repodata folder in it.
The reason for it is that when the check to invoke calculation runs (recursively on all files under this folder), it also finds there .rpm files.
This will automatically trigger the calculation again.
Same goes also for move actions.
Steps to reproduce :
1. Create RPM repo and set folder depth 3 , and auto calculate metadata.
2. Create a 3 folders inside the repo and upload an rpm into the folder.
Wait for metadata calculation.
Wait for some minutes, the folder comes back (without the RPM , metadata recalculated which you can see from timestamps but ).