Re: Fix for another data loss bug


> : "Safe save" and "Do backups" don't work on the remote VFS.  Fixing it
> : properly is quite hard, because it requires on implementation of rename()
> : on VFS.
> Well, we discussed mcedit's "Do backups" and "Safe save" algorithms in 1999.
> I still think it do this in wrong way. Below are some lines from my and
> Norbert's letters.
> >>  *  if 1 (safe save) then
> >>  *              a) save to <tempnam>,
> >>  *              b) rename <tempnam> to <filename>;
> >>  *  should be:
> >>  *              a) copy <filename> to <tempnam>;
> >>  *              b) truncate <filename> file;
> >>  *              c) save to <filename>;
> >>  *              d) unlink <tempnam>;

So, you are eliminating "rename"!  I think it's an excellent idea and
should be implemented some day.  It can be slower on VFS, because "copy"
may involve sending data back and forth, but it can be eliminated on FiSH.
Anyway, this will be _really_ safe.

> This done in proposed way in joe.

That's very encouraging.  Thank you for taking time to investigate.

Pavel Roskin

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