2 Commits

Author SHA1 Message Date
Tim Biermann
8bc31c0745 Fix segfault in prt-cache
Co-authored-by: Alexandr Savca <alexandr.savca89@gmail.com>
2022-02-27 22:30:23 +01:00
Juergen Daubert
da6bfb0a60 move prt-get.aliases to /etc, update version to 5.19.5 2020-10-16 10:27:37 +02:00
4 changed files with 9 additions and 4 deletions

2
configure vendored
View File

@@ -2585,7 +2585,7 @@ fi
# Define the identity of the package.
PACKAGE=prt-get
VERSION=5.19.4
VERSION=5.19.5
cat >>confdefs.h <<_ACEOF

View File

@@ -1,7 +1,7 @@
# Process this file with autoconf to produce a configure script.
AC_INIT
AC_CONFIG_SRCDIR([src/prtget.cpp])
AM_INIT_AUTOMAKE(prt-get,5.19.4)
AM_INIT_AUTOMAKE(prt-get,5.19.5)
dnl Determine default prefix

View File

@@ -27,7 +27,7 @@ using namespace std;
const string PkgDB::PKGDB = "/var/lib/pkg/db";
const string PkgDB::ALIAS_STORE = LOCALSTATEDIR"/lib/pkg/prt-get.aliases";
const string PkgDB::ALIAS_STORE = SYSCONFDIR"/prt-get.aliases";
/*!
Create a PkgDB object

View File

@@ -1806,6 +1806,11 @@ void PrtGet::ls()
if ( p ) {
string dirname = p->path() + "/" + p->name();
DIR* dir = opendir(dirname.c_str());
if (dir == NULL) {
cerr << "Directory " << dirname << " not found" << endl;
m_returnValue = PG_GENERAL_ERROR;
return;
}
struct dirent* entry;
vector<string> files;
while ((entry = readdir(dir))) {
@@ -1848,7 +1853,7 @@ void PrtGet::cat()
}
string file = p->path() + "/" + p->name() + "/" + fileName;
if (!printFile(file)) {
cerr << "File '" << *it << "' not found" << endl;
cerr << "File '" << fileName << "' not found" << endl;
m_returnValue = PG_GENERAL_ERROR;
return;
}