> Just curious if it would be feasible to have c2 extract capx files to another location other than the temp folder when editing? Or I wonder if there's a way to block them from being deleted while the project is open.
>
This problem comes up from time to time and I don't really know what to do about it. If you have a bunch of programs open and you wipe your temp folder, is it really surprising to then find out you wiped files that were actively in use by the currently open programs?
C2 stores a lot of project information in temp because changes shouldn't be saved to your project until you click "save". With .capx files, which are really an entire project folder in a zip, it extracts the entire project to temp and works with everything there until you click save, then it zips the whole temp folder again and overwrites your .capx file. This is essential: nobody wants their file on disk to be modified until they click "save".
I don't want to make it save anywhere else because the operating system "temp" folder is the correct place to put this. If you do something like open a .capx and then forcibly close C2 (or it crashes), its temp files are all left behind. These kinds of leftover files can accumulate for various reasons, and then you may want to legitimately clean them all up, which standard tools/OS functions can do - just I assumed you'd always do this without any programs actively open!
So it seems some people run these utilities while their projects are open in C2, and it goes ahead and wipes their currently open work in temp. I think C2 can lock the files to prevent other tools trying to delete them, but I never thought people would try to do this, so now there's all sorts of bits of code scattered all through the C2 codebase which accesses various parts of the project in temp. If I forget just one file, the project will still get corrupted by cleaning temp. So... don't clean temp when apps are using temp files?
I'm having a problem where the temp files are being deleted randomly without me choosing to do so. I'm not sure why this is happening, but it is annoying when my project suddenly stops working and I find out all the files are missing. What should I do about this?