diff options
author | Michael Vogt <michael.vogt@ubuntu.com> | 2005-05-13 17:51:05 +0000 |
---|---|---|
committer | Michael Vogt <michael.vogt@ubuntu.com> | 2005-05-13 17:51:05 +0000 |
commit | e82bdb118257ddea01a26f0c5503e06d17ae8794 (patch) | |
tree | 1b0f0a46b29bb14cdff0bbdbabddde0296ec3267 | |
parent | 0430b189a2334653852de4f1a65d2833b281f4ce (diff) |
* fix for output of the description and the debTranslationsIndex::Exists()
-rw-r--r-- | apt-pkg/deb/debindexfile.cc | 2 | ||||
-rw-r--r-- | cmdline/apt-cache.cc | 4 |
2 files changed, 2 insertions, 4 deletions
diff --git a/apt-pkg/deb/debindexfile.cc b/apt-pkg/deb/debindexfile.cc index 67fddfbd4..ffecbdfca 100644 --- a/apt-pkg/deb/debindexfile.cc +++ b/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 /*{{{*/ diff --git a/cmdline/apt-cache.cc b/cmdline/apt-cache.cc index 7f9936dfc..9293a9858 100644 --- a/cmdline/apt-cache.cc +++ b/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; |