mirror of
https://github.com/arduino/Arduino.git
synced 2025-02-18 12:54:25 +01:00
[Win] Move recoverDefaultSketchbookFolder after init() stage
Solves #7097; the user will be prompted if default sketchbook folder doesn't exist. If needed, the exception will be thrown by getDefaultSketchbookFolder() as in Linux/OSX implementations.
This commit is contained in:
parent
eb05bee7b0
commit
7bef3d549b
@ -44,7 +44,7 @@ import com.sun.jna.win32.W32APIOptions;
|
||||
public class Platform extends processing.app.Platform {
|
||||
|
||||
private File settingsFolder;
|
||||
private File defaultSketchbookFolder;
|
||||
private File defaultSketchbookFolder = null;
|
||||
|
||||
@Override
|
||||
public void init() throws Exception {
|
||||
@ -52,7 +52,6 @@ public class Platform extends processing.app.Platform {
|
||||
|
||||
checkPath();
|
||||
recoverSettingsFolderPath();
|
||||
recoverDefaultSketchbookFolder();
|
||||
}
|
||||
|
||||
private void recoverSettingsFolderPath() throws Exception {
|
||||
@ -119,6 +118,7 @@ public class Platform extends processing.app.Platform {
|
||||
|
||||
@Override
|
||||
public File getDefaultSketchbookFolder() throws Exception {
|
||||
recoverDefaultSketchbookFolder();
|
||||
return defaultSketchbookFolder;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user