Skip to content

Commit

Permalink
make use of custom partitions.csv if it exists
Browse files Browse the repository at this point in the history
  • Loading branch information
dl9rdz committed Sep 26, 2021
1 parent 278ffa0 commit e5a022c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/ESP32FS.java
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,12 @@ private void createAndUpload(){
return;
}

File partitionsFile = new File(platform.getFolder() + "/tools/partitions", partitions + ".csv");
// A custom partitions.csv in the sketch folder overrides the board preferences
// This is hard coded in https://github.com/espressif/arduino-esp32/blob/master/platform.txt
File partitionsFile = new File(editor.getSketch().getFolder(), "partitions.csv");
if (!partitionsFile.exists() || !partitionsFile.isFile()) {
partitionsFile = new File(platform.getFolder() + "/tools/partitions", partitions + ".csv");
}
if (!partitionsFile.exists() || !partitionsFile.isFile()) {
System.err.println();
editor.statusError("SPIFFS Error: partitions file " + partitions + ".csv not found!");
Expand Down

0 comments on commit e5a022c

Please sign in to comment.