Changeset 2790

Show
Ignore:
Timestamp:
09/18/08 08:46:39 (18 months ago)
Author:
kris
Message:

Fixed up a few more bugs with updating, and a potential crash when an update fails to download. Will roll into online update later today.

Location:
pcbsd
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • pcbsd/branches/7.0/SystemUpdater/UpdaterTray.cpp

    r2780 r2790  
    10511051 
    10521052    UpdaterStatusDialog->setProgressTotalSteps(100); 
     1053 
     1054    // Make sure that any old patch is removed first 
     1055    QFile tmpfile("/PCBSD/tmp/patch" + tmp.setNum(currentSysWorkingItem) + ".lzma"); 
     1056    if ( tmpfile.exists() ) 
     1057    { 
     1058      tmpfile.remove(); 
     1059    } 
    10531060      
    10541061    copyJob = KIO::copy(SysUpdateURL[currentSysWorkingItem], "/PCBSD/tmp/patch" + tmp.setNum(currentSysWorkingItem) + ".lzma", KIO::HideProgressInfo); 
     
    11201127       { 
    11211128 
     1129           // Show the updater status dialog, so user can see any errors 
     1130           UpdaterStatusDialog->show(); 
    11221131 
    11231132           QMessageBox::critical( this->contextMenu(), tr("Online Update"), tr("An error occured while downloading. Please check your connection or try again later."), QMessageBox::Ok ); 
     1133 
    11241134           if ( UpdaterStatusDialog->isShown() ) 
    11251135           { 
     
    18381848 
    18391849    UpdaterStatusDialog->setProgressTotalSteps(100); 
     1850 
     1851    // Make sure that any old PBI is removed first 
     1852    QFile tmpfile("/PCBSD/tmp/" + tmp.setNum(currentWorkingPBI) + ".pbi"); 
     1853    if ( tmpfile.exists() ) 
     1854    { 
     1855      tmpfile.remove(); 
     1856    } 
     1857      
    18401858     
    18411859    copyJob = KIO::copy(URL, "/PCBSD/tmp/" + tmp.setNum(currentWorkingPBI) + ".pbi", KIO::HideProgressInfo); 
  • pcbsd/trunk/SystemUpdater/UpdaterTray.cpp

    r2780 r2790  
    10511051 
    10521052    UpdaterStatusDialog->setProgressTotalSteps(100); 
     1053 
     1054    // Make sure that any old patch is removed first 
     1055    QFile tmpfile("/PCBSD/tmp/patch" + tmp.setNum(currentSysWorkingItem) + ".lzma"); 
     1056    if ( tmpfile.exists() ) 
     1057    { 
     1058      tmpfile.remove(); 
     1059    } 
    10531060      
    10541061    copyJob = KIO::copy(SysUpdateURL[currentSysWorkingItem], "/PCBSD/tmp/patch" + tmp.setNum(currentSysWorkingItem) + ".lzma", KIO::HideProgressInfo); 
     
    11201127       { 
    11211128 
     1129           // Show the updater status dialog, so user can see any errors 
     1130           UpdaterStatusDialog->show(); 
    11221131 
    11231132           QMessageBox::critical( this->contextMenu(), tr("Online Update"), tr("An error occured while downloading. Please check your connection or try again later."), QMessageBox::Ok ); 
     1133 
    11241134           if ( UpdaterStatusDialog->isShown() ) 
    11251135           { 
     
    18381848 
    18391849    UpdaterStatusDialog->setProgressTotalSteps(100); 
     1850 
     1851    // Make sure that any old PBI is removed first 
     1852    QFile tmpfile("/PCBSD/tmp/" + tmp.setNum(currentWorkingPBI) + ".pbi"); 
     1853    if ( tmpfile.exists() ) 
     1854    { 
     1855      tmpfile.remove(); 
     1856    } 
     1857      
    18401858     
    18411859    copyJob = KIO::copy(URL, "/PCBSD/tmp/" + tmp.setNum(currentWorkingPBI) + ".pbi", KIO::HideProgressInfo);