Autosaving stacks corrupted on network drives

Bob Sneidar bobsneidar at iotecdigital.com
Wed Oct 25 11:54:06 EDT 2017


I thought the OS takes care of that. Are we saying that when saving to a network share this process of creating the semaphore file does not happen? 

Bob S


> On Oct 24, 2017, at 16:01 , Mike Kerner via use-livecode <use-livecode at lists.runrev.com> wrote:
> 
> Possible solutions:
> 1) Do what LibreOffice does.  Create an invisible semaphore file that the
> stack checks for on open.  If it exists, the open is rejected and the stack
> immediately closes.  This will keep secondary and simultaneous users from
> getting their grubby paws into the stack before the save/sync is complete.
> As part of this solution, I would suggest any quit/closeStack event has a
> built in delay to confirm that the sync/save has completed before removing
> the semaphore.  This is still tricky as you are at the mercy of the
> sync/save tool, however, if you're clever, you can use the service's api to
> check, separately, if the sync/save is complete before you let LC finish
> closing down.
> 2) Split the data out into a separate data file or better into a database
> (because most databases use transactions, with greatly minimizes the
> probability of corruption).





More information about the use-livecode mailing list