As luck would have it, I experienced a similar failure with the script this morning. Nothing had changed on my laptop, just went to import my FlashAir data as usual and the script failed miserably!
My cursory look around showed that something in MacOS changed some lines in the script. To be honest, I didn't think this was possible. The app was not opened for editing, just double clicked to start the copy process. I usually reboot the laptop first thing in the morning before I do the import so the only things running were the usual background apps (roboform, google drive, flux, etc) and none of those have any reason to care about CopyCPAP. Not to mention the fact that it had to be saved in its changed form. This is absolutely puzzling! I never opened it for editing and never saved it in its changed state. Some examples of the code that was changed:
Code:
quit application "Applet"
.....
«event coredosc» "rsync -avz /Volumes/" & diskName & "/" & " " & copyLocation given «class kfil»:window 1
.....
set isBusy to «class busy» as boolean
So now it's a matter of trying to determine if the problem is with AppleScript, Finder, a corrupt file, or something else buried in MacOS and why/how it is changing a file without being told to.
To check if it was the script itself, I copied the code from the wiki page and pasted it into a new Script Editor window, then saved it with a new name (and my network info). It worked as expected without any problems. So I don't see an issue with the script itself, and there were no problems with the data being copied, or the connection to my FlashAir.
Now it's time to go hunting for a reason as to why this is happening.....
As to the Finder issue I posted about previously...
It was a known issue and there were 100 or so different fixes posted online. I tried all of them over time and nothing fixed it for me. I had to switch to using a third party file manager app to prevent it from disconnecting my SMB connections. Unfortunately, Finder is such an integral part of the OS that it is impossible not to use it in some fashion, and even more impossible to get rid of it. Apple has never acknowledged the issue or published any fix that I know of. They were probably too busy working on Big Sur....