Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does IntelliJ mark .java files as executable?

I'm on a team where some developers are using Eclipse and others are using IntelliJ 12.1.3, all under Windows 7. The Eclipse users are noticing diffs on the properties of .java files. The specific change is visible with cygwin's ls command: the executable bit is set on user, group and other. What causes this? Is there a way to tell IntelliJ not to monkey with this bit?

like image 472
Don Branson Avatar asked Jun 07 '13 16:06

Don Branson


1 Answers

Found this: http://youtrack.jetbrains.com/issue/IDEA-74433

By default, on each save IDEA creates a new file, writes to it, drops original, and renames new file. Setting idea.no.safe.write disables this behavior (original file is just rewritten instead).

Further down..

It is now configured via GUI - File | Settings | General | Use "safe write". You need to un-check it.

The thread says the root cause is because the original files are over sftp (which wasn't true for me, all my files are on the local filesystem), but this fixed it for me.

like image 195
Nelson Monterroso Avatar answered Oct 18 '22 05:10

Nelson Monterroso