From d6333f8f37b1b4c4038358a87b057832819a53ab Mon Sep 17 00:00:00 2001
From: Matthijs Kooijman <matthijs@stdin.nl>
Date: Mon, 7 Apr 2014 11:30:00 +0200
Subject: [PATCH] Don't save a new preferences file in Preferences.init

Preferences.init would write out the default preferences when no
preference file previously existed. This would cause a default
preferences file to be written even when --no-save-prefs was passed, due
to the ordering of things.

However, since the Base constructor now already calls
Preferences.save(), there is no need for Preferences.init to also do
this. Since Base calls this after parsing the commandline, the
--no-save-prefs option is now also properly respected.
---
 app/src/processing/app/Preferences.java | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/app/src/processing/app/Preferences.java b/app/src/processing/app/Preferences.java
index 119681086..ca3900845 100644
--- a/app/src/processing/app/Preferences.java
+++ b/app/src/processing/app/Preferences.java
@@ -266,11 +266,7 @@ public class Preferences {
       }
     }
 
-    if (!preferencesFile.exists()) {
-      // create a new preferences file if none exists
-      // saves the defaults out to the file
-      save();
-    } else {
+    if (preferencesFile.exists()) {
       // load the previous preferences file
       try {
         load(new FileInputStream(preferencesFile));