AP_Logger: use new DirHandle for directory listings

This commit is contained in:
Andrew Tridgell 2020-03-12 12:58:41 +11:00
parent 6583f7c13e
commit b5cc1f236a

View File

@ -225,7 +225,7 @@ uint16_t AP_Logger_File::find_oldest_log()
// relying on the min_avail_space_percent feature we could end up
// doing a *lot* of asprintf()s and stat()s
EXPECT_DELAY_MS(3000);
DIR *d = AP::FS().opendir(_log_directory);
auto *d = AP::FS().opendir(_log_directory);
if (d == nullptr) {
// SD card may have died? On linux someone may have rm-rf-d
return 0;