File tree 1 file changed +8
-2
lines changed
1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -174,13 +174,16 @@ private void createAndUpload(){
174
174
String esptoolCmd = platform .getTool ("esptool" ).get ("cmd" );
175
175
File esptool ;
176
176
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 ()){
178
180
esptool = new File (PreferencesData .get ("runtime.tools.esptool.path" ), esptoolCmd );
179
181
if (!esptool .exists ()) {
180
182
System .err .println ();
181
183
editor .statusError ("SPIFFS Error: esptool not found!" );
182
184
return ;
183
185
}
186
+ }
184
187
}
185
188
String mkspiffsCmd ;
186
189
if (PreferencesData .get ("runtime.os" ).contentEquals ("windows" ))
@@ -189,13 +192,16 @@ private void createAndUpload(){
189
192
mkspiffsCmd = "mkspiffs" ;
190
193
191
194
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 ()) {
193
198
tool = new File (PreferencesData .get ("runtime.tools.mkspiffs.path" ), mkspiffsCmd );
194
199
if (!tool .exists ()) {
195
200
System .err .println ();
196
201
editor .statusError ("SPIFFS Error: mkspiffs not found!" );
197
202
return ;
198
203
}
204
+ }
199
205
}
200
206
201
207
int fileCount = 0 ;
You can’t perform that action at this time.
0 commit comments