Join GitHub today
Don't trash non-empty directories on Windows #3673
It appears that the Windows backend of send2trash can't guarantee that files won't actually be deleted. There are some hints that this happens in particular when you delete a lot of data at once. So this returns to refusing to delete folders unless they're empty (or contain only ipynb checkpoints).