Skip to content

Commit d6333f8

Browse files
matthijskooijmancmaglie
authored andcommitted
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.
1 parent 4452eb3 commit d6333f8

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

app/src/processing/app/Preferences.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -266,11 +266,7 @@ static protected void init(String args[]) {
266266
}
267267
}
268268

269-
if (!preferencesFile.exists()) {
270-
// create a new preferences file if none exists
271-
// saves the defaults out to the file
272-
save();
273-
} else {
269+
if (preferencesFile.exists()) {
274270
// load the previous preferences file
275271
try {
276272
load(new FileInputStream(preferencesFile));

0 commit comments

Comments
 (0)