DataFlash_File: Support custom_log_directory

This commit is contained in:
Víctor Mayoral Vilches 2015-06-28 21:12:34 +02:00 committed by Andrew Tridgell
parent 2e7a4aa1e6
commit c06abeb02e
1 changed files with 5 additions and 0 deletions

View File

@ -98,6 +98,11 @@ void DataFlash_File::Init(const struct LogStructure *structure, uint8_t num_type
}
#endif
const char* custom_dir = hal.util->get_custom_log_directory();
if (custom_dir != NULL){
_log_directory = custom_dir;
}
ret = stat(_log_directory, &st);
if (ret == -1) {
ret = mkdir(_log_directory, 0777);