From 59b58b549982bf1e59a3f3296a777207f36b2023 Mon Sep 17 00:00:00 2001 From: joeycastillo Date: Sun, 27 Oct 2024 14:30:58 -0400 Subject: [PATCH] don't reformat filesystem on every boot --- filesystem/filesystem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/filesystem/filesystem.c b/filesystem/filesystem.c index e265a864..3b476426 100644 --- a/filesystem/filesystem.c +++ b/filesystem/filesystem.c @@ -142,7 +142,7 @@ bool filesystem_init(void) { // reformat if we can't mount the filesystem // this should only happen on the first boot - if (1) { + if (err < 0) { printf("Ignore that error! Formatting filesystem...\r\n"); err = lfs_format(&eeprom_filesystem, &watch_lfs_cfg); if (err < 0) return false;