Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PyCharm / IntelliJ deletes empty folders by default

Is there a way to prevent PyCharm / IntelliJ from removing empty folders?

I write output files to a folder in my project. When I delete them, the default behaviour of PyCharm is to remove the empty folder.

Can I prevent this?

like image 801
Jeff Avatar asked Apr 09 '14 14:04

Jeff


People also ask

How do I delete a folder in IntelliJ?

Select an item you want to delete. Select Refactor | Safe Delete from the main or context menu or press Alt+Delete .

How do I ignore a folder in IntelliJ?

In the Settings/Preferences dialog Ctrl+Alt+S , click Directories . In the Exclude files field, type the masks that define the names of files and folders to be excluded, for example, *.


1 Answers

When you delete the last file in a directory from Git in the command line (git rm dir/file.txt), Git itself automatically deletes the whole directory.

In other words: IDE behaves the same as Git does.

Can I prevent this?

Nope. At least not at the moment.

http://youtrack.jetbrains.com/issue/IDEA-75590 -- watch this ticket (star/vote/comment) to get notified for any progress.

like image 158
LazyOne Avatar answered Nov 15 '22 11:11

LazyOne