Ticket #2232: diskfull.patch

File diskfull.patch, 2.5 KB (added by korli, 16 years ago)

patch from Christian Fasshauer

  • installer/CopyEngine.cpp

     
    7474        {
    7575            status_t err = Start(fWindow->GetSourceMenu(),
    7676                fWindow->GetTargetMenu());
    77             if (err != B_OK) {
     77            if (err != B_OK || fControl->CheckUserCanceled()) {
    7878                ERR("Start failed");
     79                SetStatusMessage("Installation aborted." );
    7980                BMessenger(fWindow).SendMessage(RESET_INSTALL);
    8081            }
    8182            break;
     
    283284            BPath path;
    284285            entry.GetPath(&path);
    285286            ERR2("error while copying %s", path.Path());
     287            fControl->Cancel(false);
    286288        }
    287289    }
    288290}
  • installer/InstallerCopyLoopControl.cpp

     
    100100
    101101
    102102bool
    103 InstallerCopyLoopControl::Cancel()
     103InstallerCopyLoopControl::Cancel(bool alert)
    104104{
    105     fUserCanceled = (new BAlert("",
     105    fUserCanceled = alert ? (new BAlert("",
    106106            "Are you sure you want to to stop the installation?",
    107107            "Continue", "Stop", 0,
    108             B_WIDTH_AS_USUAL, B_STOP_ALERT))->Go() != 0;
     108            B_WIDTH_AS_USUAL, B_STOP_ALERT))->Go() != 0 : true;
    109109    return fUserCanceled;
    110110}
    111111
  • installer/InstallerWindow.cpp

     
    217217                    }
    218218                    break;
    219219                case kFinished:
     220                    SetStatusMessage("Installation completed.");
    220221                    PostMessage(B_QUIT_REQUESTED);
    221222                    break;
    222223                case kCancelled:
  • installer/InstallerCopyLoopControl.h

     
    3535        virtual bool ChecksumFile(const entry_ref *);
    3636        virtual bool SkipAttribute(const char *attributeName);
    3737        virtual bool PreserveAttribute(const char *attributeName);
    38         bool Cancel();
     38        bool Cancel(bool alert = true);
    3939        void Reset();
    4040
    4141    private:
  • installer/FSUtils.cpp

     
    831831    if (gStatusWindow)
    832832        gStatusWindow->RemoveStatusItem(thread);
    833833
    834     return B_OK;
     834    return result;
    835835}
    836836
    837837class FailWithAlert {