Browse Source

DataFlash: remove NuttX/VRBrain hack for mixed-case filenames

master
Peter Barker 6 years ago committed by Andrew Tridgell
parent
commit
6c14924de3
  1. 14
      libraries/DataFlash/DataFlash_File.cpp

14
libraries/DataFlash/DataFlash_File.cpp

@ -98,20 +98,6 @@ void DataFlash_File::Init() @@ -98,20 +98,6 @@ void DataFlash_File::Init()
int ret;
struct stat st;
#if CONFIG_HAL_BOARD == HAL_BOARD_PX4 || CONFIG_HAL_BOARD == HAL_BOARD_VRBRAIN
// try to cope with an existing lowercase log directory
// name. NuttX does not handle case insensitive VFAT well
DIR *d = opendir("/fs/microsd/APM");
if (d != nullptr) {
for (struct dirent *de=readdir(d); de; de=readdir(d)) {
if (strcmp(de->d_name, "logs") == 0) {
rename("/fs/microsd/APM/logs", "/fs/microsd/APM/OLDLOGS");
break;
}
}
closedir(d);
}
#endif
const char* custom_dir = hal.util->get_custom_log_directory();
if (custom_dir != nullptr){
_log_directory = custom_dir;

Loading…
Cancel
Save