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

This commit is contained in:
Peter Barker 2019-01-16 12:14:51 +11:00 committed by Andrew Tridgell
parent 21f2b74096
commit 6c14924de3

View File

@ -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;