The final directory gets created in the loop before the final directory create is called.
Check if the directory exists before the final directory create call.
} // for
}
- return f_directory_create(path, mode);
+ status = f_directory_exists(path);
+ if (F_status_is_error(status)) return status;
+
+ if (status == F_false || status == F_file_found_not) {
+ return f_directory_create(path, mode);
+ }
+
+ return F_okay;
}
#endif // _di_fl_directory_create_