mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-18 21:43:33 +08:00
Merge pull request #2225 from DonLakeFlyer/FTP
Fix opendir failure handling
This commit is contained in:
@@ -316,14 +316,8 @@ MavlinkFTP::_workList(PayloadHeader* payload)
|
|||||||
_mavlink->send_statustext_critical("FTP: can't open path (file system corrupted?)");
|
_mavlink->send_statustext_critical("FTP: can't open path (file system corrupted?)");
|
||||||
_mavlink->send_statustext_critical(dirPath);
|
_mavlink->send_statustext_critical(dirPath);
|
||||||
#endif
|
#endif
|
||||||
// this is not an FTP error, abort directory read and continue
|
// this is not an FTP error, abort directory by simulating eof
|
||||||
|
return kErrEOF;
|
||||||
payload->data[offset++] = kDirentSkip;
|
|
||||||
*((char *)&payload->data[offset]) = '\0';
|
|
||||||
offset++;
|
|
||||||
payload->size = offset;
|
|
||||||
|
|
||||||
return errorCode;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef MAVLINK_FTP_DEBUG
|
#ifdef MAVLINK_FTP_DEBUG
|
||||||
|
|||||||
Reference in New Issue
Block a user