]> git.saurik.com Git - apt.git/blobdiff - cmdline/acqprogress.cc
Add a GetListOfFilesInDir() helper method which replaces the old
[apt.git] / cmdline / acqprogress.cc
index dbc8ade13ec4004f775a735c351c876950971bec..b3ded4142f651f831db799604b6527075bf13a9d 100644 (file)
@@ -145,11 +145,11 @@ void AcqTextStatus::Stop()
    bandwidth and ETA indicator. */
 bool AcqTextStatus::Pulse(pkgAcquire *Owner)
 {
+   pkgAcquireStatus::Pulse(Owner);
+   
    if (Quiet > 0)
       return true;
    
-   pkgAcquireStatus::Pulse(Owner);
-   
    enum {Long = 0,Medium,Short} Mode = Long;
    
    char Buffer[sizeof(BlankLine)];
@@ -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;
 }
                                                                        /*}}}*/