Once a program has been compiled in Lazarus (whether debug or release version), Lazarus deletes temporary files generated during compilation.
There seems to be a very dangerous glitch in the way this is achieved: it can cause not only the temporary files to be deleted but also parent folders, e.g., a whole folder tree representing a Lazarus poroject. In fact, I just got most of my D:\DropBox content deleted (>80 000 files) while compling a program in Lazarus.
I don't know how Lazarus 4.6 cleans up temporary files but my guess is that what triggers its misbehaviour is that DropBox locks files that are changed and then uploads them to its web server.
The problem is that when Lazarus 4.6 is unable to delete a temporarily locked file, it doesn't simpoly ignores this file but to recursively starts to delete files up the folder tree.
I can, of course, restore the deleted using DropBox, but it's time consuming (a really dangerous behavior and very annoying.
I have used DropBox for > 10 years and never had an similar problems with Lazarus 3.8.
In short, the fault is definitely with the compiler of Lazarus 4.6.
I have worked around this issue by simply excluding the relevant "Debug" and the "Release" folders from monitored by DropBox. Yet, today it happened again and Lazarus more or less wiped out everyting in D:\DropBox.
A safe solution is, of course, to manually inactivate DropBox completely while working in Lazaurs 4.6 but then I loose the ability to regret silly coding.
For an non-professional programmer like me, it seems strange that the names of generated temporary files are not collected and once the compilation has complete these specific files are deleted. Why rely on something that recursively deleted files in a file tree.
Anyhow, please look into this ASAP.
Also, if anyone can suggest a solution that I can implement without inactivating DropBox, it would be very welcome!
/Ben
Benoni B. Edin (Benoni.Edin@gmail.com)
Örnsköldsvik, Sverige