|
|
@@ -112,7 +112,11 @@ static void onListFiles(const char * dir_name, bool isCD = false) {
|
|
|
uint8_t index = 0;
|
|
|
uint8_t file_entry[ENTRY_SIZE] = {0};
|
|
|
|
|
|
- dir.open(dir_name);
|
|
|
+ if (!dir.open(dir_name)) {
|
|
|
+ if (!SD.mkdir(dir_name) || !dir.open(dir_name)) {
|
|
|
+ logmsg("ERROR: Could not open or create BlueSCSI Toolbox shared dir: ", dir_name);
|
|
|
+ }
|
|
|
+ }
|
|
|
dir.rewindDirectory();
|
|
|
while (file.openNext(&dir, O_RDONLY))
|
|
|
{
|