.idea/.name deleted on closing IDE




I'm using IntelliJ 2016.1.

I noticed that every time I open and close a project the .name file that contains my project name is deleted!

How can I prevent this?

How can I rename a project permanently in IJ 2016.1?



Comment actions Permalink

to reproduce the behaviour:
1. open the project
2. rename the project (the .name file is created)
3. close the project (the .name file is there)
4. reopen the project (the projec ha correct name)
5. close the project (the .name file is deleted)

P.S: project folder and project name are not the same string

P.P.S this happens only with the 2016.1 version.


Comment actions Permalink

Can't reproduce. .name file remains after step 5.

Comment actions Permalink

mmm ok, the project is a Gradle Android project.

The root folder name is Android, and I can't rename it.

The project module name is Hub.

I want to remane the main IJ project, so the one I can see in the title bar.

Maybe this can help to reproduce.

I hope you can help me because now the only way to identify my projects in the start IJ window is looking the path!


Comment actions Permalink

I was wron, it is not in the project/IDE closing, but in the project opening.

Every time before to open project I re-add the .name file.

After the project open I can see the correct name in the bar title.

After few seconds, the project became Android and in the workspace.xml i have these lines:

<change type="DELETED" beforePath="$PROJECT_DIR$/.idea/.name" afterPath="" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />


Comment actions Permalink

Please submit a bug with a sample project at https://youtrack.jetbrains.com/issues/IDEA.

Comment actions Permalink

I'm having the same problem with one of my projects.

Comment actions Permalink

I can't provide the problem project but am willing to offer any other info.


Comment actions Permalink

I can reproduce this behavior if I:

  • delete the .gradle directory
  • start the IDE
  • build the project (eg: double-click on "assemble" in the Gradle tool panel)
  • exit the IDE

Since it's standard practice to exclude .gradle from vcs (eg: put it in your .gitignore), it's pretty easy to end up with a working directory without the .gradle subtree (eg: after creating a new working repo, or running `git clean -xf`), which means IntelliJ IDEA will mysteriously also delete the .idea/.name file after you build.


Please sign in to leave a comment.