Skip to content

Commit 6e9d0e5

Browse files
author
Federico Fissore
committed
Ignoring rewrite rules if rewriting=disabled is present in target platform.txt
1 parent 29cb42e commit 6e9d0e5

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

arduino-core/src/processing/app/debug/LegacyTargetPlatform.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,10 +119,12 @@ public LegacyTargetPlatform(String _name, File _folder, TargetPackage parent)
119119
format(_("Error loading {0}"), localPlatformsFile.getAbsolutePath()), e);
120120
}
121121

122-
try {
123-
rewriteKeysOfOldPlatformsTxtAndWarnAboutIt();
124-
} catch (IOException e) {
125-
throw new TargetPlatformException(e);
122+
if (!preferences.containsKey("rewriting") || !"disabled".equals(preferences.get("rewriting"))) {
123+
try {
124+
rewriteKeysOfOldPlatformsTxtAndWarnAboutIt();
125+
} catch (IOException e) {
126+
throw new TargetPlatformException(e);
127+
}
126128
}
127129

128130
File progFile = new File(folder, "programmers.txt");

0 commit comments

Comments
 (0)