summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2007-08-06 16:48:55 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2007-08-06 16:48:55 +0200
commit25ffa4e814c5e8cceae339476787291d3ee584cf (patch)
tree5d2ee7002cbcd1cf24beedc2c78007ff6ad0544a /apt-pkg
parent1ce0597f39134fe2948d621d566b7c3c8f278d91 (diff)
* apt-pkg/deb/dpkgpm.cc:
- fix packagename extraction when writting apport reports
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/deb/dpkgpm.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc
index a65f6eb0a..dad8da9ed 100644
--- a/apt-pkg/deb/dpkgpm.cc
+++ b/apt-pkg/deb/dpkgpm.cc
@@ -895,9 +895,9 @@ void pkgDPkgPM::WriteApportReport(const char *pkgpath, const char *errormsg)
// get the pkgname and reportfile
pkgname = flNotDir(pkgpath);
- pos = pkgname.rfind('_');
+ pos = pkgname.find('_');
if(pos != string::npos)
- pkgname = string(pkgname, 0, pos);
+ pkgname = pkgname.substr(0, pos);
// find the package versin and source package name
pkgCache::PkgIterator Pkg = Cache.FindPkg(pkgname);