mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-19 09:42:11 +03: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:
committed by
Cristian Maglie
parent
9e17e52f63
commit
cf4fb7d0e3
@ -147,8 +147,10 @@ public class Base {
|
|||||||
// when no parameter was specified to an option. Later, Base() will
|
// when no parameter was specified to an option. Later, Base() will
|
||||||
// then show an error for these.
|
// then show an error for these.
|
||||||
for (int i = 0; i < args.length - 1; i++) {
|
for (int i = 0; i < args.length - 1; i++) {
|
||||||
if (args[i].equals("--preferences-file"))
|
if (args[i].equals("--preferences-file")) {
|
||||||
preferencesFile = new File(args[i + 1]);
|
++i;
|
||||||
|
preferencesFile = new File(args[i]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// run static initialization that grabs all the prefs
|
// run static initialization that grabs all the prefs
|
||||||
|
Reference in New Issue
Block a user