Re: [PATCH 1/2] Add separate "Append to file" button

Chris Siebenmann <[email protected]> Tue, 12 Jun 2012 22:50:10 -0400
Newsgroups gmane.mail.exmh.devel
Message-ID <[email protected]>
| Wolfgang Denk wrote:
| > There are many cases where I would like to overwrite an existing file,
| > but the "Save to file" funtion always appends only.  So create a new
| > "Append to file" button for this functionality, and make "Save to
| > file" just perform a plain write, overwriting any existing data.
| 
| Nice idea.
| However I bet changing "Save to file" from append to creat() will bite 
| someone.  Not that I'm arguing against it, just might be worth
| considering for an interim release or so:
| 	maybe add temporary codebefore the O_TRUNC or whatever to
| 	warn or confirm ?  (but as we all hate "Are you sure", let
| 	the "Are you sure" also announce "This warning will be
| 	removed next release" - Just an idea ?

 If 'Save to file' has been appending to files for more than a decade,
I really think that it shouldn't be changed on people. If people really
want this change in the main source, I would suggest two modifications
here:

- put the 'Append to file' button in the physical position where 'Save
  to file' has been.
- rename 'Save to file' to 'Write to file', so that people do not mistake
  it for the old behavior.

I would actually prefer a variant of this, where 'Save to file' retains
the current behavior that people are expecting and 'Write to file' is
introduced to overwrite files. This avoids a dangerous, incompatible
change to long standing behavior.

	- cks