summaryrefslogtreecommitdiff
path: root/apt-pkg/sourcelist.cc
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2011-01-12 17:09:04 +0100
committerDavid Kalnischkies <kalnischkies@gmail.com>2011-01-12 17:09:04 +0100
commit36f1098aed548651a32a2c15cc9ad80c4330b4d9 (patch)
treedff27e3b63f2e2a5587f3d53a8477b3551739759 /apt-pkg/sourcelist.cc
parent758729c8084a19859d3c9ccf948bb2ec507b0d0c (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/sourcelist.cc')
-rw-r--r--apt-pkg/sourcelist.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/apt-pkg/sourcelist.cc b/apt-pkg/sourcelist.cc
index c3ec9865a..851eefdfe 100644
--- a/apt-pkg/sourcelist.cc
+++ b/apt-pkg/sourcelist.cc
@@ -197,7 +197,7 @@ bool pkgSourceList::ReadMainList()
string Main = _config->FindFile("Dir::Etc::sourcelist");
string Parts = _config->FindDir("Dir::Etc::sourceparts");
- if (FileExists(Main) == true)
+ if (RealFileExists(Main) == true)
Res &= ReadAppend(Main);
else if (DirectoryExists(Parts) == false)
// Only warn if there are no sources.list.d.
@@ -205,9 +205,9 @@ bool pkgSourceList::ReadMainList()
if (DirectoryExists(Parts) == true)
Res &= ReadSourceDir(Parts);
- else if (FileExists(Main) == false)
+ else if (RealFileExists(Main) == false)
// Only warn if there is no sources.list file.
- _error->WarningE("FileExists", _("Unable to read %s"), Main.c_str());
+ _error->WarningE("RealFileExists", _("Unable to read %s"), Main.c_str());
return Res;
}