summaryrefslogtreecommitdiff
path: root/xdelta3/xdelta3-main.h
diff options
context:
space:
mode:
authorjosh.macdonald@gmail.com <josh.macdonald@gmail.com@a3eca27d-f21b-0410-9b4a-6511e771f64e>2010-08-01 04:26:30 +0000
committerjosh.macdonald@gmail.com <josh.macdonald@gmail.com@a3eca27d-f21b-0410-9b4a-6511e771f64e>2010-08-01 04:26:30 +0000
commit24ff9cf7f34fa7481a71a1ecdcfe1a67d964c2b1 (patch)
tree84b35918ef5bdbcd15774c80562e6937fffb62a0 /xdelta3/xdelta3-main.h
parentcc9bb70bea56488e2524bb64386182ae2c069f4d (diff)
address issue 109 adds a strong warning about external decompression
Diffstat (limited to 'xdelta3/xdelta3-main.h')
-rw-r--r--xdelta3/xdelta3-main.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/xdelta3/xdelta3-main.h b/xdelta3/xdelta3-main.h
index 13bc16f..64f90da 100644
--- a/xdelta3/xdelta3-main.h
+++ b/xdelta3/xdelta3-main.h
@@ -153,6 +153,7 @@ typedef enum
153 RD_FIRST = (1 << 0), 153 RD_FIRST = (1 << 0),
154 RD_NONEXTERNAL = (1 << 1), 154 RD_NONEXTERNAL = (1 << 1),
155 RD_DECOMPSET = (1 << 2), 155 RD_DECOMPSET = (1 << 2),
156 RD_MAININPUT = (1 << 3),
156} xd3_read_flags; 157} xd3_read_flags;
157 158
158/* main_file->mode values */ 159/* main_file->mode values */
@@ -2496,6 +2497,19 @@ main_secondary_decompress_check (main_file *file,
2496 decompressor->decomp_options, 2497 decompressor->decomp_options,
2497 (option_force2 ? " -f" : ""), 2498 (option_force2 ? " -f" : ""),
2498 file->filename); 2499 file->filename);
2500 if (file->flags & RD_MAININPUT)
2501 {
2502 XPR(NT
2503 "WARNING: the encoder is automatically decompressing the primary input\n");
2504 XPR(NT
2505 "WARNING: the decoder will automatically re-compress the primary output\n");
2506 XPR(NT
2507 "WARNING: this may result in different compressed data and checksums\n");
2508 XPR(NT
2509 "WARNING: despite being identical data; if this is an issue, use -D\n");
2510 XPR(NT
2511 "WARNING: to avoid decompression and/or manually decompress the inputs\n");
2512 }
2499 } 2513 }
2500 2514
2501 file->size_known = 0; 2515 file->size_known = 0;
@@ -4400,7 +4414,7 @@ main (int argc, char **argv)
4400 goto cleanup; 4414 goto cleanup;
4401 } 4415 }
4402 4416
4403 ifile.flags = RD_FIRST; 4417 ifile.flags = RD_FIRST | RD_MAININPUT;
4404 sfile.flags = RD_FIRST; 4418 sfile.flags = RD_FIRST;
4405 sfile.filename = option_source_filename; 4419 sfile.filename = option_source_filename;
4406 4420