Moving open files

Derek Broughton news at pointerstop.ca
Mon Jul 7 19:20:07 UTC 2008


Mumia W. wrote:

> Dotan Cohen wrote:
>> 2008/7/7 Derek Broughton <news at pointerstop.ca>:
>>> [...] No, sorry, I don't agree with that.  You may not like the
>>> [behaviour, but it
>>> is logical.  Would you still think it's a bug if the user had just
>>> _copied_
>>> the original, and then there were two different versions?  I can't do
>>> exactly the same thing with Word, because it _does_ lock the file, but
>>> that's a design choice.
>> 
>> In my opinion, and the opinion of he who 'lost' his data, there should
>> be a lock file.
>> [...]
> 
> Even if there were a lock file, the result of moving the files using
> 'mv' would be the same--data loss. 'Mv' is a very simple application
> that doesn't know about file locks, and it might move *both* the
> original and lock files to a new location--effectively destroying the
> lock.

Well, not really.  First, there was no loss of data.  I'm sorry the user
couldn't find it, but really it isn't rocket science to figure that if OO
opened a file in location A and somebody proceded to move it to location B,
OO may not know anything about that move.  That said, if OO kept the file
open, then mv could move it elsewhere, but OO would still write to the
_file_ not create a new file with the original name.  Plus, it really is
badly behaved if it writes a "new" file - when it should know it's
modifying an old file - and doesn't bother to inform the user that the file
moved.  _That_ should be fairly simple to both fix and get attention for.
-- 
derek





More information about the ubuntu-users mailing list