Locking of open tellico file?
Tommy Wareing
tommy-tellico at mrwolf.afraid.org
Tue Apr 17 03:29:09 MDT 2007
Norbert Nemec <Norbert.Nemec.list at ...> writes:
>
> Hi there,
>
> over and over again, I happened to accidentally open two instances of
> tellico in parallel leading to the loss of changes done in one of them,
> when I save from the other. Could the file be locked at opening as it is
> done in many other programs?
The other option would be to generate a "magic number" (which is somehow
dependant on the file content) at the point the file is opened, and re-test the
file before saving to ensure that the "magic number" is still valid. Then, as
long as the saving process actually changes the number, you won't accidentally
overwrite the file (from within tellico: obviously other applications could do
so).
Of course, it'd have the downside that you'd still be able to make changes in
two open instances of tellico, but you'd be unable to save one set, so it could
still give rise to wasted time. But at least you could be informed.
The most obvious ways of generating such a magic number would be:
the modification timestamp of the file.
a version number embedded within the file itself.
a checksum (MD5?) of the file content.
More information about the tellico-users
mailing list