Skip to content

Commit 6b3b769

Browse files
igrrkzyapkov
authored andcommitted
ESP8266FS: fix for portable install
1 parent 6c3a7cc commit 6b3b769

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

src/ESP8266FS.java

+8-5
Original file line numberDiff line numberDiff line change
@@ -133,13 +133,16 @@ private void createAndUpload(){
133133

134134
TargetPlatform platform = BaseNoGui.getTargetPlatform();
135135

136+
String esptoolCmd = platform.getTool("esptool").get("cmd");
136137
File esptool;
137-
if(!PreferencesData.get("runtime.os").contentEquals("windows")) esptool = new File(platform.getFolder()+"/tools", "esptool");
138-
else esptool = new File(platform.getFolder()+"/tools", "esptool.exe");
138+
esptool = new File(platform.getFolder()+"/tools", esptoolCmd);
139139
if(!esptool.exists()){
140-
System.err.println();
141-
editor.statusError("SPIFFS Error: esptool not found!");
142-
return;
140+
esptool = new File(PreferencesData.get("runtime.tools.esptool.path"), esptoolCmd);
141+
if (!esptool.exists()) {
142+
System.err.println();
143+
editor.statusError("SPIFFS Error: esptool not found!");
144+
return;
145+
}
143146
}
144147

145148
File tool;

0 commit comments

Comments
 (0)