unreliable file deletion via script

Sarah Reichelt sarahr at genesearch.com.au
Tue May 10 18:34:13 EDT 2005


> Whenever any stack is opened, it creates (from a preopencard script) a 
> Busy*.txt file, such as "BusypaymentReceipt.txt".  This is to prevent 
> more than one person accessing a stack at a time.
> All of the stacks have in their closestack script that which deletes 
> the Busy file, for instance:
>
> if there is a file "BusypaymentReceipt.txt" then delete file 
> "BusypaymentReceipt.txt"
>
> This almost always works perfectly, but sometimes, a closing stack for 
> some reason fails to delete its Busy file.  I can manually delete the 
> file if needed, but that's obviously not what I intended, and I 
> certainly don't want to ask anyone else to do so!  Does anyone have 
> any ideas why the busy file deletion is not entirely reliable?  Script 
> problem?
>
I don't know why it isn't working, but if you check "the result" after 
deleting, you might be able to see why.
Then if it has failed, your script could wait a few ticks and try again.

Are you sure the default folder is set correctly? Maybe it is looking 
for the file in the wrong place?

Cheers,
Sarah



More information about the use-livecode mailing list