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: Antonio Diaz Diaz
Subject: Re: [PATCH v3] gzip: add "--keep" option to keep (don't delete) input files
Date: Wed, 13 Feb 2013 18:07:59 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.7.11) Gecko/20050905

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

Yes, but using --stdout is not the only way of setting to_stdout to true. --list, for example, sets to_stdout to true but does not set keep.

Then you made the change

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

removing to_stdout from the condition. So I guess "gzip --list file" will now delete "file".


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 ?

Yes, that to_stdout is a global variable set to true in more than one place. Not only when --stdout is used.


Regards,
Antonio.



reply via email to

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