From 6e9d0e5f9946c6c4355a2841c3b9a044f07a62f5 Mon Sep 17 00:00:00 2001 From: Federico Fissore Date: Wed, 1 Apr 2015 09:01:31 +0200 Subject: [PATCH] Ignoring rewrite rules if rewriting=disabled is present in target platform.txt --- .../src/processing/app/debug/LegacyTargetPlatform.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/arduino-core/src/processing/app/debug/LegacyTargetPlatform.java b/arduino-core/src/processing/app/debug/LegacyTargetPlatform.java index 493ba5147..a9476c124 100644 --- a/arduino-core/src/processing/app/debug/LegacyTargetPlatform.java +++ b/arduino-core/src/processing/app/debug/LegacyTargetPlatform.java @@ -119,10 +119,12 @@ public class LegacyTargetPlatform implements TargetPlatform { format(_("Error loading {0}"), localPlatformsFile.getAbsolutePath()), e); } - try { - rewriteKeysOfOldPlatformsTxtAndWarnAboutIt(); - } catch (IOException e) { - throw new TargetPlatformException(e); + if (!preferences.containsKey("rewriting") || !"disabled".equals(preferences.get("rewriting"))) { + try { + rewriteKeysOfOldPlatformsTxtAndWarnAboutIt(); + } catch (IOException e) { + throw new TargetPlatformException(e); + } } File progFile = new File(folder, "programmers.txt");