]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/cachefile.cc
implement reverse_iterators for cachesets
[apt.git] / apt-pkg / cachefile.cc
index ea3d454806223943e2902ebef8e1eb2071ec44b7..690776266c96e3d5741688f1b2632fe605300bc8 100644 (file)
@@ -65,8 +65,8 @@ bool pkgCacheFile::BuildCaches(OpProgress *Progress, bool WithLock)
 
    if (_config->FindB("pkgCacheFile::Generate", true) == false)
    {
-      Map = new MMap(*new FileFd(_config->FindFile("Dir::Cache::pkgcache"),
-                    FileFd::ReadOnly),MMap::Public|MMap::ReadOnly);
+      FileFd file(_config->FindFile("Dir::Cache::pkgcache"), FileFd::ReadOnly);
+      Map = new MMap(file, MMap::Public|MMap::ReadOnly);
       Cache = new pkgCache(Map);
       if (_error->PendingError() == true)
          return false;