Re: Autosaving stacks corrupted on network drives

2017-10-25 Thread Richard Gaskin via use-livecode
Brian Milby wrote: > The stack file isn’t a package. If using an old format, then it may > have a resource fork. Anything in the resource for was put there by the developer. Having been born on Unix. MetaCard (the LC engine's original name) provided functions for using resources on Mac, but

Re: Autosaving stacks corrupted on network drives

2017-10-25 Thread Bob Sneidar via use-livecode
There may be a way to shell the permissions, but it would require sudo on a Mac and UAC on Windows. There is a locked flag in both OS I believe... but you would then have to script saves. An alternative way to semaphore this process is to have a text file that you increment a number for anytime

RE: Autosaving stacks corrupted on network drives

2017-10-25 Thread Ralph DiMola via use-livecode
-livecode [mailto:use-livecode-boun...@lists.runrev.com] On Behalf Of Bob Sneidar via use-livecode Sent: Wednesday, October 25, 2017 1:13 PM To: How to use LiveCode Cc: Bob Sneidar Subject: Re: Autosaving stacks corrupted on network drives Okay I think I see what is going on here. A Livecode stack

Re: Autosaving stacks corrupted on network drives

2017-10-25 Thread Brian Milby via use-livecode
The stack file isn’t a package. If using an old format, then it may have a resource fork. The stack is read into memory and the file closed (not sure how resource fork stuff is handled though). On Wed, Oct 25, 2017 at 12:16 PM Mike Kerner via use-livecode < use-livecode@lists.runrev.com> wrote:

Re: Autosaving stacks corrupted on network drives

2017-10-25 Thread Mike Kerner via use-livecode
I was thinking about the mechanics of this. A stack is really a folder/bundle, at least on macos/ios, so I wonder if parts of the stack bundle are open and parts are not, which could really make things problematic... On Wed, Oct 25, 2017 at 1:12 PM, Bob Sneidar via use-livecode <

Re: Autosaving stacks corrupted on network drives

2017-10-25 Thread Bob Sneidar via use-livecode
Okay I think I see what is going on here. A Livecode stack, though it appears to be open in the IDE, is NOT open from the OS point of view. To test this, create a new livecode stack, save it, then attempt to delete it in the OS while it's still open in the IDE. If my theory is correct, you

Re: Autosaving stacks corrupted on network drives

2017-10-25 Thread Mike Kerner via use-livecode
Now if what you're suggesting is that the server OS should manage the access process so that you cannot have two simultaneous accesses, I would agree, but my experience has been that it doesn't always work that way. On Wed, Oct 25, 2017 at 12:19 PM, Mike Kerner wrote:

Re: Autosaving stacks corrupted on network drives

2017-10-25 Thread Mike Kerner via use-livecode
I'm saying that it is possible to access the same file from the same share from multiple machines and leave the file in an indeterminate or corrupted state, afterwards, especially if both machines accessing the share are trying to save changes to said file. The purpose of the semaphore would be

Re: Autosaving stacks corrupted on network drives

2017-10-25 Thread Bob Sneidar via use-livecode
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 > wrote: > > Possible solutions: > 1) Do what

Re: Autosaving stacks corrupted on network drives

2017-10-25 Thread Mike Kerner via use-livecode
Yes. Transactions are the individual operations, i.e. an audit trail. Then if there is corruption in the db, it is able to "play back" the transactions to recreate it. On Wed, Oct 25, 2017 at 10:31 AM, tbodine via use-livecode < use-livecode@lists.runrev.com> wrote: > Thanks, Mark and Trevor,

Re: Autosaving stacks corrupted on network drives

2017-10-25 Thread tbodine via use-livecode
Thanks, Mark and Trevor, for those ideas. >>Mark wrote: 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).  Does "databases use transactions" mean DBs don't rewrite the entire

Re: Autosaving stacks corrupted on network drives

2017-10-24 Thread Trevor DeVore via use-livecode
On Tue, Oct 24, 2017 at 6:03 PM Mike Kerner via use-livecode < use-livecode@lists.runrev.com> wrote: > Yes, this especially happens with simultaneous sync tools such as google > drive (now backup and sync), microsoft ,oneDrive box, and dropbox. There > are a variety of things that play into this

Re: Autosaving stacks corrupted on network drives

2017-10-24 Thread Mike Kerner via use-livecode
Yes, this especially happens with simultaneous sync tools such as google drive (now backup and sync), microsoft ,oneDrive box, and dropbox. There are a variety of things that play into this annoying behavior, but the most common one is timing and latency/connectivity. It really gets to be bad if