Created a job to connect to a share and delete files older than 3 days. It's also set to delete any empty sub folders.
\\server\share\folder1\folderA\files - it deletes the files, then deletes folderA on the next pass.
This works fine.
After upgrading from 4.9.58 to 5.1.6, it now deletes any empty folder on the same level as folder1 instead of restricting itself to folders below folder1 level.