PhpStorm deletes folders when the last file in them is deleted?

I have a lot of folders in my project with a single file in them:


I recently found a need to completely delete several files in these directories and I've noticed that when I do it in PhpStorm it also deletes the folders, which means I either have to delete the files through my file browser or re-create the folders.

Is there a way to stop this from happening?


Hi there,

Is it actually deletes those folders from file system .. or just hides them in Project View panel?

If actually deleted ...  your VCS for this project is Git, right?

If so -- then it's not a bug as PhpStorm does exactly the same as git itself :


Yes, that appears to be the same issue.


Please sign in to leave a comment.