#include <sstream>
#include <sys/stat.h>
+#include <unistd.h>
/*}}}*/
// Sources Index /*{{{*/
std::string debPackagesIndex::ArchiveInfo(pkgCache::VerIterator const &Ver) const
{
std::string Res = Target.Description;
- Res.erase(Target.Description.rfind(' '));
+ {
+ auto const space = Target.Description.rfind(' ');
+ if (space != std::string::npos)
+ Res.erase(space);
+ }
Res += " ";
Res += Ver.ParentPkg().Name();
return _error->Error("Popen failed");
content << "Filename: " << debfile << "\n";
- content << "Size: " << Buf.st_size << "\n";
+ content << "Size: " << std::to_string(Buf.st_size) << "\n";
bool first_line_seen = false;
char buffer[1024];
do {