File Locking

Roland Roberts roland@astrofoto.org
12 Jun 2002 19:49:47 -0400


>>>>> "Paul" == Paul Lussier <plussier@mindspring.com> writes:

    Paul> In a message dated: 12 Jun 2002 18:31:24 EDT
    Paul> Rafe Moody said:

    >> I have a situation where I am trying to load a
    >> file but am receiving an error message stating the
    >> file is locked and may be in use by another user.
    >> I know for certain the file is not in use.
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    >> I am warned that opening the file may cause damage
    >> to it. Is there any way to remove the lock without
    >> corrupting the data. I thank you in advance for
    >> your help.

    Paul> Shut down GnuCash, cd to the directory where
    Paul> your gnucash data file is located, then look
    Paul> for the lock file.  It should be *.LCK or
    Paul> something like that.  Delete that file, then
    Paul> start up GnuCash again.

This is not necessary; if there is no one actually using the file,
you may go ahead and open it in spite of the lock.  The warning is
there because *if* the file is in use (which is what the lock is
supposed to indicate) then opening the file will result in
corruption simply because there are two of you trying to write to
it.

Actually, I've wondered if the latter is really true or if it is
simply the case that you will lose half your changes; the ones from
whomever writes the file back first.

roland
-- 
		       PGP Key ID: 66 BC 3B CD
Roland B. Roberts, PhD                             RL Enterprises
roland@rlenter.com                     76-15 113th Street, Apt 3B
roland@astrofoto.org                       Forest Hills, NY 11375