Moving open files

Kim Goldenberg kgoldenberg at oit.state.nj.us
Tue Jul 8 18:18:06 UTC 2008


Derek Broughton wrote:
> Dotan Cohen wrote:
> 
>> Perhaps a system where the program checks to see that the file still
>> exists, and if not, then queries the filesystem to find out what
>> happened to it? It would be a pain to implement, I'm sure.
> 
> Finding out "what happened to it" is certainly a pain, but knowing that the
> file changed or moved is pretty simple.  Most KDE apps - and I would expect
> most Gnome apps - manage that much.  So they pop up a dialog that says "the
> file has moved or changed, what do you want to do?"  That should be enough
> of a clue for all but the most clueless users :-)

Unfortunately, as has been discussed previously, OOo get around this by 
moving the file into memory and /tmp overflow files, and then rewriting 
the file when you save it, and doesn't check the existence of a file 
before writing; If it's there, you mean to replace it, if not, you are 
creating it. I'm not trying to say that OOo is correct, only that this 
was their design decision. I can come up with pros and cons on this and 
the fact is that this system does not account for the types of changes 
that occurred.

Lock files could help only if everything checked for them in a standard 
method. OS's like MVS do this with an ENQUEUE/RESERVE system such that a 
flag is set on a shared disk that locks it from all other systems except 
the one making the change. Windows' monolithic design makes this easier 
as well, but put constraints on multiuser capabilities. Linux has no one 
way of doing this, and there are many possibilities for it to fail, as 
was the case here. How would one lock a file on and NFS mount? What 
happens if the connection goes away? Is CIFS (Samba/Windows) that much 
more robust? I don't know.

The lost file is a pain, and I've had my share of rebuilding files from 
memory (what did I just change?). Very little can really stop you form 
shooting yourself in the foot if you don't have the full knowledge of 
what you are doing.

Kim
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kgoldenberg.vcf
Type: text/x-vcard
Size: 339 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20080708/e9beacfc/attachment.vcf>


More information about the ubuntu-users mailing list