Subject: Re: bug#18141: 24.4.50; saving .gz file breaks file coding

From: Stefan Monnier <[email-masked]>
Date: Thu, 07 Aug 2014 16:43:05 -0400

> We could add a new optional argument to write-region to control
> whether backup is performed.

We could.  But I think write-region is already too big with too
many arguments.  I'd rather try to split it up into sub-components,
which is desirable in and of itself.

But that's just my preference, and I won't oppose a patch that takes
a different route.

> I think users generally expect this to be a transaction.  And at least
> on Posix platforms, where rename is an atomic operation, we can
> achieve this, or come pretty close.

I think the time-window is inevitable as long as we do "move first, then
write the new file".  Of course, we could do it the "precious"
way instead (i.e. write the new file first and then do the needed
link&unlink to move it into place).

        Stefan