Game Development Community

Truncated .CS files

by Jaimi McEntire · in Torsion · 07/02/2009 (7:06 pm) · 1 replies

Today while I was editing my project, I went to precompile and it reported there was an error, but didn't give me any info. I went ahead and ran the application, and it told me the same thing, and asked if I wanted to run it anyway. I replied yes, thinking I could see the errors in the window below.

However, then it told me my files had changed, and asked if I wanted to reload them. Foolishly, I said yes. My .cs files that I had edited then blanked out. :( Then I looked in the directory itself, and the files were all 0K. Only files that I had edited were blank.

Anyone seen anything like this?

Anyway, If you ever see that your file has changed on disk, be sure to say NO, do not reload it.


UPDATE: The problem was that I ran out of disk space. Torsion happily tried to save the files, but couldn't, then noticed that the file sizes were different, and the rest is sad, sad history.

Moral 1: Don't run out of space. A terabyte costs only $70.
Moral 2: When you write a file, if it doesn't succeed, notify the user, and don't prompt them to reload the empty file, losing their work.