1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-12 01:53:07 +03:00

Fix failure when trying to open empty file (#1126)

This commit is contained in:
Ivan Grokhotkov
2015-12-05 16:29:37 +03:00
parent 053de36223
commit f7bbea407e
2 changed files with 20 additions and 1 deletions

View File

@ -139,7 +139,15 @@ void setup() {
fail("some files left after format");
}
}
{
File tmp = SPIFFS.open("/tmp.txt", "w");
}
{
File tmp = SPIFFS.open("/tmp.txt", "w");
if (!tmp) {
fail("failed to re-open empty file");
}
}
Serial.println("success");
}