Ensure --verbose is never saved to preferences.txt

Previously, --verbose would be processed after the preferences were
saved, which should usually mean that it should never influence the
saved preferences. However, if for whatever reason Preferences.save()
would be called later, the verbosity preferences would still be messed
up.

Since we now have a Preferences.setDoSave() method, we can make sure
that these verbosity preferences (and any other preferences that are
changed after the build started) are never saved.
This commit is contained in:
Matthijs Kooijman 2014-04-07 11:51:09 +02:00 committed by Cristian Maglie
parent d6333f8f37
commit 7cb99ad7b8
1 changed files with 4 additions and 0 deletions

View File

@ -449,6 +449,10 @@ public class Base {
Preferences.set("build.verbose", "" + doVerboseBuild);
Preferences.set("upload.verbose", "" + doVerboseUpload);
// Make sure these verbosity preferences are only for the
// current session
Preferences.setDoSave(false);
Editor editor = editors.get(0);
if (action == ACTION.UPLOAD) {