Recalculate root folders and resources when a folder is deleted.