Sat, 03 Mar 2018 17:56:49 +0200
reimplemented detection of broken references in PartDownloadRequest::downloadFinished
src/partdownloadrequest.cpp | file | annotate | diff | comparison | revisions |
--- a/src/partdownloadrequest.cpp Sat Mar 03 17:52:40 2018 +0200 +++ b/src/partdownloadrequest.cpp Sat Mar 03 17:56:49 2018 +0200 @@ -217,17 +217,12 @@ // Iterate through this file and check for errors. If there's any that stems // from unknown file references, try resolve that by downloading the reference. - // This is why downloading a part may end up downloading multiple files, as - // it resolves dependencies. for (LDObject* obj : document->objects()) { - LDError* err = dynamic_cast<LDError*> (obj); + LDSubfileReference* reference = dynamic_cast<LDSubfileReference*>(obj); - if (err == nullptr or err->fileReferenced().isEmpty()) - continue; - - QString dest = err->fileReferenced(); - prompt()->downloadFromPartsTracker (dest); + if (reference and reference->fileInfo(m_documents) == nullptr) + prompt()->downloadFromPartsTracker(reference->referenceName()); } prompt()->addFile (document);