pw_file: Minor logging tweak
Silences NOT_FOUND error logging, as that isn't an error but instead is
an expected response.
Change-Id: Ia6faa65ed3a19503f53bf1299d7d717c275f12c3
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/71225
Pigweed-Auto-Submit: Armando Montanez <amontanez@google.com>
Reviewed-by: Alexei Frolov <frolv@google.com>
Commit-Queue: Auto-Submit <auto-submit@pigweed.google.com.iam.gserviceaccount.com>
diff --git a/pw_file/flat_file_system.cc b/pw_file/flat_file_system.cc
index 0cafd6b..61ffab8 100644
--- a/pw_file/flat_file_system.cc
+++ b/pw_file/flat_file_system.cc
@@ -60,9 +60,11 @@
// For now, don't try to pack entries.
pw::file::ListResponse::MemoryEncoder encoder(writer.PayloadBuffer());
if (Status status = EnumerateFile(*entry, encoder); !status.ok()) {
- PW_LOG_ERROR("Failed to enumerate file (id: %u) with status %d",
- static_cast<unsigned>(entry->FileId()),
- static_cast<int>(status.code()));
+ if (status != Status::NotFound()) {
+ PW_LOG_ERROR("Failed to enumerate file (id: %u) with status %d",
+ static_cast<unsigned>(entry->FileId()),
+ static_cast<int>(status.code()));
+ }
continue;
}