Fixed mismatched delete call, updated dist target to use xz instead of gzip

This commit is contained in:
Matt Housh 2023-08-28 18:58:53 -05:00
parent c0295368c6
commit edc24af2ba
2 changed files with 3 additions and 3 deletions

View File

@ -70,6 +70,6 @@ dist: all
rm -rf $(name)-$(version) rm -rf $(name)-$(version)
mkdir $(name)-$(version) mkdir $(name)-$(version)
cp *.cpp *.h Makefile AUTHORS COPYING ChangeLog README TODO *.8 \ cp *.cpp *.h Makefile AUTHORS COPYING ChangeLog README TODO *.8 \
httpup-repgen* httpup.conf* $(name)-$(version) httpup-repgen httpup.conf* $(name)-$(version)
tar cvzf $(name)-$(version).tar.gz $(name)-$(version) tar Jcvf $(name)-$(version).tar.xz $(name)-$(version)
rm -rf $(name)-$(version) rm -rf $(name)-$(version)

View File

@ -89,7 +89,7 @@ int main(int argc, char** argv)
} else { } else {
char* pwd = new char[256]; char* pwd = new char[256];
if (getcwd(pwd, 256) == NULL) { if (getcwd(pwd, 256) == NULL) {
delete pwd; delete[] pwd;
pwd = new char[1024]; pwd = new char[1024];
if (getcwd(pwd, 1024) == NULL) { if (getcwd(pwd, 1024) == NULL) {
cerr << "Path longer then 1024 characters; exiting" << endl; cerr << "Path longer then 1024 characters; exiting" << endl;