Problems deleting a folder from the tree view

If I have an non-empty directory, Atom is not able to delete that folder unless I close the folder first.

There was another thread about Maven not being to delete a folder when Atom is open because Atom keeps the files locked when they’re displayed in the tree. It makes sense that an external program shouldn’t be able to delete locked files, but I’m having trouble getting Atom itself to delete open folders.

It’s not just that it doesn’t work. It doesn’t work in a particularly hostile and disruptive way. If I have a directory open in the tree view, and I want to delete that directory. First Atom gives me a prompt asking me if I want to delete the folder, then Windows brings up a “Folder Access Denied” dialog with an Administrator “Continue” button, clicking on that opens a User Account Control dialog (helpfully behind everything else), clicking through that to grant access brings up the final “The following file couldn’t be moved to the trash” error popup.

I would think that because the delete command is coming from the file view, Atom could unlock the folder tree before trying to delete it. Maybe even just automatically close the folder first?