Skip to content

Commit 2a8457d

Browse files
committed
Close settings file when giving up
1 parent 2ead395 commit 2a8457d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Firmware/RTK_Everywhere/NVM.ino

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -840,6 +840,7 @@ bool loadSystemSettingsFromFileLFS(char *fileName, const char *findMe, char *fou
840840
{
841841
// If we can't read the first line of the settings file, give up
842842
systemPrintln("Giving up on settings file");
843+
settingsFile.close();
843844
return (false);
844845
}
845846
}
@@ -855,6 +856,7 @@ bool loadSystemSettingsFromFileLFS(char *fileName, const char *findMe, char *fou
855856
{
856857
// If we can't read the first line of the settings file, give up
857858
systemPrintln("Giving up on settings file");
859+
settingsFile.close();
858860
break;
859861
}
860862
}
@@ -932,6 +934,7 @@ bool printSystemSettingsFromFileLFS(char *fileName)
932934
{
933935
// If we can't read the first line of the settings file, give up
934936
systemPrintln("Giving up on settings file");
937+
settingsFile.close();
935938
return (false);
936939
}
937940
}

0 commit comments

Comments
 (0)