]> git.saurik.com Git - apt.git/commitdiff
* fix for output of the description and the debTranslationsIndex::Exists()
authorMichael Vogt <michael.vogt@ubuntu.com>
Fri, 13 May 2005 17:51:05 +0000 (17:51 +0000)
committerMichael Vogt <michael.vogt@ubuntu.com>
Fri, 13 May 2005 17:51:05 +0000 (17:51 +0000)
apt-pkg/deb/debindexfile.cc
cmdline/apt-cache.cc

index 67fddfbd42f8468310ea0079d2412a854c35b388..ffecbdfca2d73ffccce0ceca293bd8d088c2c349 100644 (file)
@@ -406,7 +406,7 @@ string debTranslationsIndex::Info(const char *Type) const
 /* */
 bool debTranslationsIndex::Exists() const
 {
-   return true;
+   return FileExists(IndexFile(LanguageCode().c_str()));
 }
                                                                        /*}}}*/
 // TranslationsIndex::Size - Return the size of the index              /*{{{*/
index 7f9936dfc7ecbc5b72734124657c2d52c790fb10..9293a9858c75f377baf3cd5201561736a84745b5 100644 (file)
@@ -1228,9 +1228,7 @@ bool DisplayRecord(pkgCache::VerIterator V)
    // Strip the Description
    unsigned char *DescP = (unsigned char*)strstr((char*)Buffer, "Description:");
    *DescP='\0';
-
-   // Write all the rest
-   if (fwrite(Buffer,1,V.FileList()->Size+1,stdout) < (size_t)(V.FileList()->Size+1))
+   if (write(STDOUT_FILENO,Buffer, strlen((char*)Buffer)+1) != strlen((char *)Buffer)+1)
    {
       delete [] Buffer;
       return false;