// CacheFile::CacheFile - Constructor /*{{{*/
// ---------------------------------------------------------------------
/* */
-pkgCacheFile::pkgCacheFile() : Map(NULL), Cache(NULL), DCache(NULL),
+pkgCacheFile::pkgCacheFile() : d(NULL), Map(NULL), Cache(NULL), DCache(NULL),
SrcList(NULL), Policy(NULL)
{
}
{
std::string cachedir = flNotFile(pkgcache);
std::string cachefile = flNotDir(pkgcache);
- if (cachedir.empty() != true && cachefile.empty() != true)
+ if (cachedir.empty() != true && cachefile.empty() != true && DirectoryExists(cachedir) == true)
{
cachefile.append(".");
std::vector<std::string> caches = GetListOfFilesInDir(cachedir, false);
std::string cachedir = flNotFile(srcpkgcache);
std::string cachefile = flNotDir(srcpkgcache);
- if (cachedir.empty() == true || cachefile.empty() == true)
+ if (cachedir.empty() == true || cachefile.empty() == true || DirectoryExists(cachedir) == false)
return;
cachefile.append(".");
std::vector<std::string> caches = GetListOfFilesInDir(cachedir, false);