Which version of Lazarus are you using?
If snapshot or SVN, which revision?
Did the IDE open any editors with "trash/random" data in it?
There was are recent issue, observed in trunk 0.9.31 (but potentially present earlier) (fixed only a few days ago) were clicking certain callstack entries, would open such an editor, and could lead to the directory being affected.
IIRC there was also a report that on certain linux distros the user can open a directory as if it was a file. Again it would look rubbish in the editor.
but if written back to disk, it may cause havoc.
As an immediate workaround, set the IDE backup option to create a backup (via file extension / not in a subfolder).
Then if the IDE writes your directory as file, it should rename the original directory first and save your data.
For anything else more feedback is required.