Skip to content

Commit

Permalink
Delete file when clearing variable database as well
Browse files Browse the repository at this point in the history
  • Loading branch information
sidoh committed Dec 23, 2020
1 parent 74ebd29 commit 906cf55
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/Variables/VariableDictionary.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ String VariableDictionary::get(const String &key) {
}

void VariableDictionary::clear() {
SPIFFS.remove(VariableDictionary::FILENAME);
SPIFFS.open(VariableDictionary::FILENAME, "w").close();

db.open(SPIFFS.open(VariableDictionary::FILENAME, "r+"));
Expand Down

0 comments on commit 906cf55

Please sign in to comment.