How about 'delete the folder if empty'? Why on earth didn't they think to do that?
That, and I'm just a bit shocked that "the folder should be empty, so delete it" didn't just naturally make people think "obviously I should check if that's true first". Even if it's not a total fix, the failure to add that is it's own layer of screwup.
Every time a program calls a deprecated API, the developer who signed the code should get an e-mail.