summaryrefslogtreecommitdiff
path: root/src/database/file_gatherer.cpp
diff options
context:
space:
mode:
authorjacqueline <me@jacqueline.id.au>2024-02-05 11:27:09 +1100
committerjacqueline <me@jacqueline.id.au>2024-02-05 11:27:09 +1100
commit0f03efe868f4a7910678a0a729f437a2fe8986b7 (patch)
tree11992f2ef907773c67b244250fb7339963addf4f /src/database/file_gatherer.cpp
parent299f3cc48f683d3e6dec1efb4957fdb49b4de2c3 (diff)
downloadtangara-fw-0f03efe868f4a7910678a0a729f437a2fe8986b7.tar.gz
Make db updates more robust again the sd card disappearing
Accidentally found a bug while live on youtube :)
Diffstat (limited to 'src/database/file_gatherer.cpp')
-rw-r--r--src/database/file_gatherer.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/database/file_gatherer.cpp b/src/database/file_gatherer.cpp
index f07a1b4d..dde363bd 100644
--- a/src/database/file_gatherer.cpp
+++ b/src/database/file_gatherer.cpp
@@ -28,6 +28,8 @@ auto FileGathererImpl::FindFiles(
while (!to_explore.empty()) {
std::string next_path_str = to_explore.front();
+ to_explore.pop_front();
+
const TCHAR* next_path = static_cast<const TCHAR*>(next_path_str.c_str());
FF_DIR dir;
@@ -72,7 +74,6 @@ auto FileGathererImpl::FindFiles(
auto lock = drivers::acquire_spi();
f_closedir(&dir);
- to_explore.pop_front();
}
}