bug-gzip
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v3] gzip: add "--keep" option to keep (don't delete) input fi


From: Rodrigo Campos
Subject: Re: [PATCH v3] gzip: add "--keep" option to keep (don't delete) input files
Date: Wed, 13 Feb 2013 13:10:35 -0300
User-agent: Mutt/1.5.21 (2010-09-15)

On Wed, Feb 13, 2013 at 05:00:50PM +0100, Antonio Diaz Diaz wrote:
> Rodrigo Campos wrote:
> >Also, this patch changes "--stdout" which "Write output on standard output; 
> >keep
> >original files unchanged" to imply "-k"
> 
> I think this is a bug. "to_stdout" and "keep" should be kept
> separate, or else "gzip -l" could delete the input file.
> 
> -    if (!to_stdout)
> +    if (!to_stdout && !keep)

Not sure I follow you. If "--stdout" is used, keep is set to true (or to 1 :))

And the patch includes:

-    if (!to_stdout)
+    if (!keep)


So the unlink is only done when keep is false. And that never happens if
"--stdout" is used, or if "--keep" is used.

Am I missing something ?




Thanks a lot,
Rodrigo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]