Well, if this is also deleting from your webroot/js/ folder then you should place your all JS and CSS file in themes folder and accordingly include it it your project.
But why you want to stop deletion of this Assets ?? Is it something different you are trying to do here.
Thanks for the suggestion, but have multiple projects and its easier to manage and I would guess good practise to keep the extension assets with the extension.
I don’t want to stop it deleting the files in the root assets folder, but it is deleting files from protected->extensions->myExtension->assets folder so when it tries to copy to the root assets folder there’s nothing there to copy.
But it doesn’t do it all the time either, it seems to be random
locally we have the projects in their own contained folders in the MAMP htdocs folder
on the server the projects have their own domain (usually VPS)
it seems to happen more when working locally and hardly at all on a server except when uploading an update to the site (not normally to do with the extensions though)
Ok, but its quite strange thing you are saying that randomly its delete assests folder.Thats why i am saying.Since if you are setting LinkAssets property of Assest manager then it should be simultaneously.But random quite strange.
Did you get something in your application log and server log.?