Skip to content

Commit f220dce

Browse files
committed
Support for new tools layout
Fixes esp8266/Arduino#991
1 parent 627ed69 commit f220dce

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/ESP8266FS.java

+8-2
Original file line numberDiff line numberDiff line change
@@ -174,13 +174,16 @@ private void createAndUpload(){
174174
String esptoolCmd = platform.getTool("esptool").get("cmd");
175175
File esptool;
176176
esptool = new File(platform.getFolder()+"/tools", esptoolCmd);
177-
if(!esptool.exists()){
177+
if(!esptool.exists() || !esptool.isFile()){
178+
esptool = new File(platform.getFolder()+"/tools/esptool", esptoolCmd);
179+
if(!esptool.exists()){
178180
esptool = new File(PreferencesData.get("runtime.tools.esptool.path"), esptoolCmd);
179181
if (!esptool.exists()) {
180182
System.err.println();
181183
editor.statusError("SPIFFS Error: esptool not found!");
182184
return;
183185
}
186+
}
184187
}
185188
String mkspiffsCmd;
186189
if(PreferencesData.get("runtime.os").contentEquals("windows"))
@@ -189,13 +192,16 @@ private void createAndUpload(){
189192
mkspiffsCmd = "mkspiffs";
190193

191194
File tool = new File(platform.getFolder() + "/tools", mkspiffsCmd);
192-
if (!tool.exists()) {
195+
if (!tool.exists() || !tool.isFile()) {
196+
tool = new File(platform.getFolder() + "/tools/mkspiffs", mkspiffsCmd);
197+
if (!tool.exists()) {
193198
tool = new File(PreferencesData.get("runtime.tools.mkspiffs.path"), mkspiffsCmd);
194199
if (!tool.exists()) {
195200
System.err.println();
196201
editor.statusError("SPIFFS Error: mkspiffs not found!");
197202
return;
198203
}
204+
}
199205
}
200206

201207
int fileCount = 0;

0 commit comments

Comments
 (0)