Просмотр исходного кода

* fix for output of the description and the debTranslationsIndex::Exists()

Michael Vogt лет назад: 21
Родитель
Сommit
e82bdb1182
2 измененных файлов с 2 добавлено и 4 удалено
  1. 1 1
      apt-pkg/deb/debindexfile.cc
  2. 1 3
      cmdline/apt-cache.cc

+ 1 - 1
apt-pkg/deb/debindexfile.cc

@@ -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		/*{{{*/

+ 1 - 3
cmdline/apt-cache.cc

@@ -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;