diff --git a/simgear/package/Install.cxx b/simgear/package/Install.cxx index 4ba1dcbc..a365b46a 100644 --- a/simgear/package/Install.cxx +++ b/simgear/package/Install.cxx @@ -152,6 +152,11 @@ protected: return; } + // disable caching on the owner's path, otherwise the upcoming + // delete & rename confuse everything + m_owner->m_path.set_cached(false); + m_extractPath.set_cached(false); + if (m_owner->path().exists()) { Dir destDir(m_owner->path()); destDir.remove(true /* recursive */); diff --git a/simgear/package/Root.cxx b/simgear/package/Root.cxx index 5ca36ccd..6040e936 100644 --- a/simgear/package/Root.cxx +++ b/simgear/package/Root.cxx @@ -477,7 +477,7 @@ void Root::installProgress(InstallRef aInstall, unsigned int aBytes, unsigned in void Root::startNext(InstallRef aCurrent) { - if (d->updateDeque.front() != aCurrent) { + if (d->updateDeque.empty() || (d->updateDeque.front() != aCurrent)) { SG_LOG(SG_GENERAL, SG_ALERT, "current install of package not head of the deque"); } else { d->updateDeque.pop_front();