diff options
author | Michael Vogt <michael.vogt@ubuntu.com> | 2010-06-09 12:04:54 +0200 |
---|---|---|
committer | Michael Vogt <michael.vogt@ubuntu.com> | 2010-06-09 12:04:54 +0200 |
commit | 617244130193ecf6fb9a1c31a679449a98b40816 (patch) | |
tree | cadee8cbfa9746b1d2ff372b98ee3b9b2f95522e /apt-pkg | |
parent | 24e9fedacb134c2dae5edcd0fa559b38f12f5dbc (diff) | |
parent | a7a2824bad5fd9c868f4774771ec9fb2f1895285 (diff) |
* apt-pkg/deb/dpkgpm.cc:
- Fix segmentation fault when /var/log/apt ist missing. LP: #535509
Diffstat (limited to 'apt-pkg')
-rw-r--r-- | apt-pkg/deb/dpkgpm.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc index 18c731788..036f0e385 100644 --- a/apt-pkg/deb/dpkgpm.cc +++ b/apt-pkg/deb/dpkgpm.cc @@ -653,6 +653,11 @@ bool pkgDPkgPM::CloseLog() } term_out = NULL; + // check if the directory exists in which we want to write the file + string const logdir = _config->FindDir("Dir::Log"); + if(not FileExists(logdir)) + return _error->Error(_("Directory '%s' missing"), logdir.c_str()); + string history_name = flCombine(_config->FindDir("Dir::Log"), _config->Find("Dir::Log::History")); if (!history_name.empty()) |