Skip to content

Commit c87c15f

Browse files
committed
[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.
1 parent bd47e5a commit c87c15f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

arduino-core/src/processing/app/windows/Platform.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,14 @@
4444
public class Platform extends processing.app.Platform {
4545

4646
private File settingsFolder;
47-
private File defaultSketchbookFolder;
47+
private File defaultSketchbookFolder = null;
4848

4949
@Override
5050
public void init() throws Exception {
5151
super.init();
5252

5353
checkPath();
5454
recoverSettingsFolderPath();
55-
recoverDefaultSketchbookFolder();
5655
}
5756

5857
private void recoverSettingsFolderPath() throws Exception {
@@ -119,6 +118,7 @@ public File getSettingsFolder() {
119118

120119
@Override
121120
public File getDefaultSketchbookFolder() throws Exception {
121+
recoverDefaultSketchbookFolder();
122122
return defaultSketchbookFolder;
123123
}
124124

0 commit comments

Comments
 (0)