409 // Iterate through this file and check for errors. If there's any that stems |
409 // Iterate through this file and check for errors. If there's any that stems |
410 // from unknown file references, try resolve that by downloading the reference. |
410 // from unknown file references, try resolve that by downloading the reference. |
411 // This is why downloading a part may end up downloading multiple files, as |
411 // This is why downloading a part may end up downloading multiple files, as |
412 // it resolves dependencies. |
412 // it resolves dependencies. |
413 for (LDObject* obj : *f) { |
413 for (LDObject* obj : *f) { |
414 if (obj->getType() != LDObject::Error) |
414 LDErrorObject* err = dynamic_cast<LDErrorObject*> (obj); |
415 continue; |
415 if (!err || err->fileRef().isEmpty()) |
416 |
|
417 LDErrorObject* err = static_cast<LDErrorObject*> (obj); |
|
418 if (err->fileRef() == "") |
|
419 continue; |
416 continue; |
420 |
417 |
421 str dest = err->fileRef(); |
418 str dest = err->fileRef(); |
422 m_prompt->modifyDest (dest); |
419 m_prompt->modifyDest (dest); |
423 m_prompt->downloadFile (dest, str (PartDownloader::k_UnofficialURL) + dest, false); |
420 m_prompt->downloadFile (dest, str (PartDownloader::k_UnofficialURL) + dest, false); |