Cancel update when cancel button is pressed.

This commit is contained in:
Robert Strouse 2023-10-19 15:25:00 -07:00
parent 51f7a0700b
commit f1386011c3
3 changed files with 2 additions and 1 deletions

View file

@ -265,7 +265,7 @@ bool GitUpdater::beginUpdate(const char *version) {
this->cancelled = false;
this->error = 0;
this->error = this->downloadFile();
if(this->error == 0) {
if(this->error == 0 && !this->cancelled) {
strcpy(this->currentFile, "SomfyController.littlefs.bin");
this->partition = U_SPIFFS;
this->error = this->downloadFile();