windows defender issues? & other AV issues
Mark Waddingham
mark at livecode.com
Thu Jan 17 10:37:17 EST 2019
On 2019-01-17 16:15, R.H. via use-livecode wrote:
> Is there any way to detect and catch an error when saving?
When the engine saves a stackfile when it has previously been saved to
the same place...
It first moves the existing file at <filename> to <filename>~. If this
step fails (e.g. because it can't move the file) then the save command
stops and returns an error indicating that in 'the result'.
Next it attempts to save the stackfile to <filename>.
If there is an error whilst writing the stackfile then the save command
stops, deletes the partially written stackfile at <filename>, moves the
<filename>~ back to <filename> and returns an appropriate error in 'the
result'.
If the engine crashes during saving, you will be left with a partially
written <filename> and a copy of the stackfile as it was successfully
last saved at <filename>~. Obviously in this case the engine has
crashed, so there is no 'the result' to check.
If saving successfully completes, then the engine deletes <filename>~
and returns empty in 'the result'.
So - assuming the engine isn't crashing (although the long save time
sounds odd - if you can submit a report/send a stackfile which takes
ages to re-save we can take a look!), then you should be able to find
out why the save is failing, or not happening as expected by checking
'the result' after the save command which is initiating the save.
Hope this helps!
Warmest Regards,
Mark.
--
Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/
LiveCode: Everyone can create apps
More information about the use-livecode
mailing list