* gzip.c (make_ofname): Implement this.
Problem reported by Sven Hartrump in
<http://lists.gnu.org/archive/html/bug-gzip/2007-05/msg00003.html>.
* NEWS, gzip.1: Document that case is ignored when looking at file name
extensions.
* doc/gzip.texi (Overview): Likewise.
+2007-05-07 Paul Eggert <eggert@cs.ucla.edu>
+
+ * NEWS: 'gzip -f foo.gz' now works instead of complaining.
+ * gzip.c (make_ofname): Implement this.
+ Problem reported by Sven Hartrump in
+ <http://lists.gnu.org/archive/html/bug-gzip/2007-05/msg00003.html>.
+
+ * NEWS, gzip.1: Document that case is ignored when looking at file name
+ extensions.
+ * doc/gzip.texi (Overview): Likewise.
+
2007-05-04 Paul Eggert <eggert@cs.ucla.edu>
* Makefile.am (.in): Substitute @bindir@, not BINDIR, for
* znew now uses $TMPDIR (default /tmp) instead of always using /tmp.
+* 'gzip -f foo.gz' now creates a file foo.gz.gz instead of complaining.
+
+* It is now documented that gzip ignores case when examining file name
+ extensions; for example, 'gzip test.Gz' (without -f) fails because
+ the file name ends in '.Gz'.
+
Major changes in Gzip 1.3.11 (2007-02-05)
* As per the GNU coding standards, the behavior of gzip and its
@command{gzip} reduces the size of the named files using Lempel-Ziv coding
(LZ77). Whenever possible, each file is replaced by one with the
extension @samp{.gz}, while keeping the same ownership modes, access and
-modification times. (The default extension is @option{-gz} for @abbr{VMS},
+modification times. (The default extension is @samp{-gz} for @abbr{VMS},
@samp{z} for @abbr{MSDOS}, @abbr{OS/2} @abbr{FAT} and Atari.)
If no files are specified or
if a file name is "-", the standard input is compressed to the standard
constructed from the original one to make it legal.
@command{gunzip} takes a list of files on its command line and replaces
-each file whose name ends with @samp{.gz}, @samp{.z}, @samp{.Z},
-@option{-gz}, @option{-z} or @samp{_z} and which begins with the correct
+each file whose name ends with @samp{.gz}, @samp{.z}
+@samp{-gz}, @samp{-z}, or @samp{_z} (ignoring case)
+and which begins with the correct
magic number with an uncompressed file without the original extension.
@command{gunzip} also recognizes the special extensions @samp{.tgz} and
@samp{.taz} as shorthands for @samp{.tar.gz} and @samp{.tar.Z}
.PP
.I gunzip
takes a list of files on its command line and replaces each
-file whose name ends with .gz, -gz, .z, -z, _z or .Z
+file whose name ends with .gz, -gz, .z, -z, or _z (ignoring case)
and which begins with the correct magic number with an uncompressed
file without the original extension.
.I gunzip
}
/* ofname might be changed later if infile contains an original name */
- } else if (suff != NULL) {
+ } else if (suff && ! force) {
/* Avoid annoying messages with -r (see treat_dir()) */
if (verbose || (!recursive && !quiet)) {
/* Don't use WARN, as it affects exit status. */