gzip: fix a data-loss bug when decompressing with --suffix=''
authorJim Meyering <meyering@redhat.com>
Sat, 20 Feb 2010 10:07:55 +0000 (11:07 +0100)
committerJim Meyering <meyering@redhat.com>
Mon, 22 Feb 2010 13:42:54 +0000 (14:42 +0100)
commit884ef6d16c66835640cf0b3539a53e95cfed059c
tree7f006dba046175c5937d8f6a51c8b106374d5e62
parent3eb6091d69a73b5955bc9acf9ca507fc5f52f42c
gzip: fix a data-loss bug when decompressing with --suffix=''

* gzip.c (main): Disallow an empty --suffix=S also with -d.
Otherwise, "gzip -d -S '' F.gz" would ask if it's ok to remove the
existing file, "F.gz";  if you reply "yes", you'd lose all of that data.
Use of an empty suffix was already rejected in compression mode.
* gzip.1 (--suffix (-S)): Do not recommend to use "gunzip -S '' *".
Describe how the suffix is used when decompressing, too.
* NEWS (Bug fixes): mention the fix.
Reported by Ripduman Sohan.
NEWS
THANKS
gzip.1
gzip.c