X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/14cb8abc9fe35ef6892b445ac874aea6dd6976db..06ca542db20aa4f4cd1e56c12ccda0ec2339b835:/cmdline/acqprogress.cc diff --git a/cmdline/acqprogress.cc b/cmdline/acqprogress.cc index dbc8ade13..a5fee1db5 100644 --- a/cmdline/acqprogress.cc +++ b/cmdline/acqprogress.cc @@ -268,16 +268,22 @@ bool AcqTextStatus::MediaChange(string Media,string Drive) { if (Quiet <= 0) cout << '\r' << BlankLine << '\r'; - ioprintf(cout,_("Media Change: Please insert the disc labeled\n" + ioprintf(cout,_("Media change: please insert the disc labeled\n" " '%s'\n" "in the drive '%s' and press enter\n"), Media.c_str(),Drive.c_str()); char C = 0; + bool bStatus = true; while (C != '\n' && C != '\r') - read(STDIN_FILENO,&C,1); - - Update = true; - return true; + { + int len = read(STDIN_FILENO,&C,1); + if(C == 'c' || len <= 0) + bStatus = false; + } + + if(bStatus) + Update = true; + return bStatus; } /*}}}*/