mirror of
https://github.com/arduino/Arduino.git
synced 2025-03-13 10:29:35 +01:00
Parse --curdir in Base.main()
This shouldn't change any behaviour, but prepares for upcoming changes.
This commit is contained in:
parent
cf4fb7d0e3
commit
87bdaa88cd
@ -117,6 +117,10 @@ public class Base {
|
||||
// Location for untitled items
|
||||
static File untitledFolder;
|
||||
|
||||
// Current directory to use for relative paths specified on the
|
||||
// commandline
|
||||
static String currentDirectory = System.getProperty("user.dir");
|
||||
|
||||
// p5 icon for the window
|
||||
// static Image icon;
|
||||
|
||||
@ -150,6 +154,12 @@ public class Base {
|
||||
if (args[i].equals("--preferences-file")) {
|
||||
++i;
|
||||
preferencesFile = new File(args[i]);
|
||||
continue;
|
||||
}
|
||||
if (args[i].equals("--curdir")) {
|
||||
i++;
|
||||
currentDirectory = args[i];
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
@ -339,7 +349,6 @@ public class Base {
|
||||
String getPref = null;
|
||||
String selectBoard = null;
|
||||
String selectPort = null;
|
||||
String currentDirectory = System.getProperty("user.dir");
|
||||
List<String> filenames = new LinkedList<String>();
|
||||
|
||||
// Map of possible actions and corresponding options
|
||||
@ -398,7 +407,7 @@ public class Base {
|
||||
i++;
|
||||
if (i >= args.length)
|
||||
showError(null, _("Argument required for --curdir"), 3);
|
||||
currentDirectory = args[i];
|
||||
// Argument should be already processed by Base.main(...)
|
||||
continue;
|
||||
}
|
||||
if (args[i].equals("--pref")) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user