Fix issues with package upgrades on Windows.

This commit is contained in:
James Turner 2017-02-23 13:26:02 +00:00
parent 9840302931
commit 707d9e12cf
2 changed files with 6 additions and 1 deletions

View File

@ -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 */);

View File

@ -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();