File tree 2 files changed +10
-16
lines changed 2 files changed +10
-16
lines changed Original file line number Diff line number Diff line change @@ -78,18 +78,15 @@ bool Arduino_Portenta_OTA_QSPI::init()
78
78
79
79
bool Arduino_Portenta_OTA_QSPI::open ()
80
80
{
81
- if (_storage_type == QSPI_FLASH_FATFS || _storage_type == QSPI_FLASH_FATFS_MBR)
81
+ DIR * dir = NULL ;
82
+ if ((dir = opendir (" /fs" )) != NULL )
82
83
{
83
- DIR * dir = NULL ;
84
- if ((dir = opendir (" /fs" )) != NULL )
84
+ if (Arduino_Portenta_OTA::findProgramLength (dir, _program_length))
85
85
{
86
- if (Arduino_Portenta_OTA::findProgramLength (dir, _program_length))
87
- {
88
- closedir (dir);
89
- return true ;
90
- }
91
86
closedir (dir);
87
+ return true ;
92
88
}
89
+ closedir (dir);
93
90
}
94
91
95
92
return false ;
Original file line number Diff line number Diff line change @@ -87,18 +87,15 @@ bool Arduino_Portenta_OTA_SD::init()
87
87
88
88
bool Arduino_Portenta_OTA_SD::open ()
89
89
{
90
- if (_storage_type == SD_FATFS || _storage_type == SD_FATFS_MBR)
90
+ DIR * dir = NULL ;
91
+ if ((dir = opendir (" /fs" )) != NULL )
91
92
{
92
- DIR * dir = NULL ;
93
- if ((dir = opendir (" /fs" )) != NULL )
93
+ if (Arduino_Portenta_OTA::findProgramLength (dir, _program_length))
94
94
{
95
- if (Arduino_Portenta_OTA::findProgramLength (dir, _program_length))
96
- {
97
- closedir (dir);
98
- return true ;
99
- }
100
95
closedir (dir);
96
+ return true ;
101
97
}
98
+ closedir (dir);
102
99
}
103
100
104
101
return false ;
You can’t perform that action at this time.
0 commit comments