Re: Fix for another dala loss bug

Pavel Roskin wrote:
: Hello!
: "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>;

>> Else all of the hard link(s) is/are linked to the old version, 
>> that are renamed or deleted.
And symlinks are just removed now.

> How is this done in other editors? To the user what's the least
> surprise with respect to hardlinks - saving affects any file name 
> with the same inode or saving breaks the connection to other file 
> names with the same inode by creating a new inode?

This done in proposed way in joe.

: Editing files on VFS with those options on can cause loss of data.  Such
: bugs should have a very high priority for us.

Best regards,

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