]> git.saurik.com Git - apt.git/blobdiff - cmdline/acqprogress.cc
* fix apt-key to ask for the correct package
[apt.git] / cmdline / acqprogress.cc
index 8b30b324b95a926c6489d17c4c5094872a12d703..a5fee1db52170688d3dbfee27e84d94ecd2dd3a0 100644 (file)
@@ -274,10 +274,16 @@ bool AcqTextStatus::MediaChange(string Media,string Drive)
            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;
 }
                                                                        /*}}}*/