From 99fe051c4a36744fdcb5a3940f0fc7de19b70b59 Mon Sep 17 00:00:00 2001 From: Cristian Maglie Date: Fri, 10 Aug 2018 20:04:50 +0200 Subject: [PATCH] Added preferences.txt option to disable preferences save Fix #5668 --- arduino-core/src/processing/app/PreferencesData.java | 3 +++ build/shared/lib/preferences.txt | 3 +++ 2 files changed, 6 insertions(+) diff --git a/arduino-core/src/processing/app/PreferencesData.java b/arduino-core/src/processing/app/PreferencesData.java index 6d9530f33..84b870357 100644 --- a/arduino-core/src/processing/app/PreferencesData.java +++ b/arduino-core/src/processing/app/PreferencesData.java @@ -114,6 +114,9 @@ public class PreferencesData { if (!doSave) return; + if (getBoolean("preferences.readonly")) + return; + // on startup, don't worry about it // this is trying to update the prefs for who is open // before Preferences.init() has been called. diff --git a/build/shared/lib/preferences.txt b/build/shared/lib/preferences.txt index f442cdb3e..e777627af 100644 --- a/build/shared/lib/preferences.txt +++ b/build/shared/lib/preferences.txt @@ -279,6 +279,9 @@ serial.line_ending=1 # default chosen language (none for none) editor.languages.current = +# Disable saving of preferences.txt file (settings will not survive Arduino IDE reboot) +preferences.readonly=false + # Debugging/Development Preferences # ---------------------------------