Commit 8513b4b8 authored by Don Gagne's avatar Don Gagne

Merge pull request #869 from vooon/ftp_list_fix

FTP: Add 'skip' list entry handling.
parents 73868e34 8f56f842
......@@ -160,7 +160,7 @@ void QGCUASFileManager::_listAckResponse(Request* listAck)
// get the length of the name
uint8_t cBytesLeft = cBytes - offset;
size_t nlen = strnlen(ptr, cBytesLeft);
if (nlen < 2) {
if ((*ptr == 'S' && nlen > 1) || (*ptr != 'S' && nlen < 2)) {
_currentOperation = kCOIdle;
_emitErrorMessage(tr("Incorrectly formed list entry: '%1'").arg(ptr));
return;
......@@ -170,10 +170,12 @@ void QGCUASFileManager::_listAckResponse(Request* listAck)
return;
}
// Returned names are prepended with D for directory, F for file, U for unknown
// Returned names are prepended with D for directory, F for file, S for skip
if (*ptr == 'F' || *ptr == 'D') {
// put it in the view
_emitListEntry(ptr);
} else if (*ptr == 'S') {
// do nothing
} else {
qDebug() << "unknown entry" << ptr;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment