Skip to content

Commit 402ab56

Browse files
authored
fix(SPIFFS): Use new disableWDT bool return value (#10909)
Analogue to this PR, but for SPIFFS: https://github.com/espressif/arduino-esp32/pull/10896/files
1 parent 732a7cb commit 402ab56

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

libraries/SPIFFS/src/SPIFFS.cpp

+4-2
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,11 @@ void SPIFFSFS::end() {
9191
}
9292

9393
bool SPIFFSFS::format() {
94-
disableCore0WDT();
94+
bool wdt_active = disableCore0WDT();
9595
esp_err_t err = esp_spiffs_format(partitionLabel_);
96-
enableCore0WDT();
96+
if (wdt_active) {
97+
enableCore0WDT();
98+
}
9799
if (err) {
98100
log_e("Formatting SPIFFS failed! Error: %d", err);
99101
return false;

0 commit comments

Comments
 (0)