diff options
author | David Kalnischkies <kalnischkies@gmail.com> | 2011-01-12 17:09:04 +0100 |
---|---|---|
committer | David Kalnischkies <kalnischkies@gmail.com> | 2011-01-12 17:09:04 +0100 |
commit | 36f1098aed548651a32a2c15cc9ad80c4330b4d9 (patch) | |
tree | dff27e3b63f2e2a5587f3d53a8477b3551739759 /apt-pkg/depcache.cc | |
parent | 758729c8084a19859d3c9ccf948bb2ec507b0d0c (diff) |
* apt-pkg/contrib/fileutl.cc:
- add a RealFileExists method and check that your configuration files
are real files to avoid endless loops if not (Closes: #604401)
Diffstat (limited to 'apt-pkg/depcache.cc')
-rw-r--r-- | apt-pkg/depcache.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apt-pkg/depcache.cc b/apt-pkg/depcache.cc index 594c085a5..d2557386d 100644 --- a/apt-pkg/depcache.cc +++ b/apt-pkg/depcache.cc @@ -167,7 +167,7 @@ bool pkgDepCache::readStateFile(OpProgress *Prog) /*{{{*/ { FileFd state_file; string const state = _config->FindFile("Dir::State::extended_states"); - if(FileExists(state)) { + if(RealFileExists(state)) { state_file.Open(state, FileFd::ReadOnly); int const file_size = state_file.Size(); if(Prog != NULL) @@ -226,7 +226,7 @@ bool pkgDepCache::writeStateFile(OpProgress *prog, bool InstalledOnly) /*{{{*/ string const state = _config->FindFile("Dir::State::extended_states"); // if it does not exist, create a empty one - if(!FileExists(state)) + if(!RealFileExists(state)) { StateFile.Open(state, FileFd::WriteAtomic); StateFile.Close(); |