mirror of
https://github.com/arduino/Arduino.git
synced 2024-11-29 10:24:12 +01:00
Don't re-parse arguments to --preferences-file
Previously, the argument to --preferences-file would be interpreted as a filename, but then also checked as an option as well (in the next loop iteration). This didn't really matter in practice (unless you would be using a file called "--preferences-file"), but better skip the argument anyway.
This commit is contained in:
parent
9e17e52f63
commit
cf4fb7d0e3
@ -147,8 +147,10 @@ public class Base {
|
||||
// when no parameter was specified to an option. Later, Base() will
|
||||
// then show an error for these.
|
||||
for (int i = 0; i < args.length - 1; i++) {
|
||||
if (args[i].equals("--preferences-file"))
|
||||
preferencesFile = new File(args[i + 1]);
|
||||
if (args[i].equals("--preferences-file")) {
|
||||
++i;
|
||||
preferencesFile = new File(args[i]);
|
||||
}
|
||||
}
|
||||
|
||||
// run static initialization that grabs all the prefs
|
||||
|
Loading…
Reference in New Issue
Block a user