diff options
author | Michael Vogt <michael.vogt@ubuntu.com> | 2005-05-13 14:40:29 +0000 |
---|---|---|
committer | Michael Vogt <michael.vogt@ubuntu.com> | 2005-05-13 14:40:29 +0000 |
commit | f416d22e97c56eedc8b4303a5aecfffaaa23eb1c (patch) | |
tree | 7448f5bd7ed1e07d2f90649b323cf51f496d08c2 /apt-pkg/deb/debindexfile.cc | |
parent | 9f6500a4e3003e31f5887a336b7abb190b52b90c (diff) |
* fixed a problem when it comes to the cache rebuilding
Diffstat (limited to 'apt-pkg/deb/debindexfile.cc')
-rw-r--r-- | apt-pkg/deb/debindexfile.cc | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/apt-pkg/deb/debindexfile.cc b/apt-pkg/deb/debindexfile.cc index b8435a6bc..67fddfbd4 100644 --- a/apt-pkg/deb/debindexfile.cc +++ b/apt-pkg/deb/debindexfile.cc @@ -458,20 +458,21 @@ bool debTranslationsIndex::Merge(pkgCacheGenerator &Gen,OpProgress &Prog) const /* */ pkgCache::PkgFileIterator debTranslationsIndex::FindInCache(pkgCache &Cache) const { + string FileName = TranslationFile(); + pkgCache::PkgFileIterator File = Cache.FileBegin(); - if (this->UseTranslation()) - for (; File.end() == false; File++) - { - if (IndexFile(LanguageCode().c_str()) != File.FileName()) - continue; + for (; File.end() == false; File++) + { + if (FileName != File.FileName()) + continue; - struct stat St; - if (stat(File.FileName(),&St) != 0) - return pkgCache::PkgFileIterator(Cache); - if ((unsigned)St.st_size != File->Size || St.st_mtime != File->mtime) - return pkgCache::PkgFileIterator(Cache); - return File; - } + struct stat St; + if (stat(File.FileName(),&St) != 0) + return pkgCache::PkgFileIterator(Cache); + if ((unsigned)St.st_size != File->Size || St.st_mtime != File->mtime) + return pkgCache::PkgFileIterator(Cache); + return File; + } return File; } /*}}}*/ |