1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-06 06:30:19 +00:00
freebsd-ports/sysutils/deltup/files/patch-deltup.cpp
Roman Bogorodskiy 3cbaa86be6 - Exit with !=0 code if patch file was not found (to improve error
handling in scripts)
- Install some docs
- Bump PORTREVISION
2005-06-05 15:32:48 +00:00

20 lines
850 B
C++

--- deltup.cpp.orig Fri May 27 18:53:49 2005
+++ deltup.cpp Fri May 27 18:55:24 2005
@@ -748,14 +748,14 @@
void applyPatchfile(char *fname) {
IStream *f = new IFStream(fname);
Injectable_IStream f2(*f);
- if (((IFStream*)f)->bad()) {fprintf(stderr, "file is missing: %s\n", fname); return;}
+ if (((IFStream*)f)->bad()) {fprintf(stderr, "file is missing: %s\n", fname); exit(1);}
int type = determine_filetype(f2);
delete f;
switch (type) {
case GZIP: f = new GZ_IFStream(fname); break;
case BZIP2: f = new BZ_IFStream(fname); break;
case DTU: f = new IFStream(fname); break;
- case UNKNOWN_FMT: fprintf(stderr, "cannot read file %s\n", fname); return;
+ case UNKNOWN_FMT: fprintf(stderr, "cannot read file %s\n", fname); exit(1);
case TARBALL :
f = new IFStream(fname);
unsigned zero_count;