User forums > Help
Codeblocks overwrote main.cpp file with a blank line.
Gimbo:
--- Quote from: Miguel Gimenez on October 05, 2019, 10:57:30 am ---C::B first saves the file (p.e. Test.cpp) in the same folder with the name ending in ".temp". If Test.cpp.temp saves OK then C:B try renaming it as Test.cpp, removing the previous file if it existed. If this operation fails, the Test.cpp.temp file is renamed as Test.cpp.save-failed.
If there is neither a .temp file nor a .save-failed file then I suspect a filesystem failure.
Reference: src\sdk\filemanager.cpp -> FileManager::Save() method
--- End quote ---
unfortunately there is not .temp file
Commaster:
I suspect this is related to configured write caching for the drive. You might want to disable write caching for the drive you are working on, this might reduce the I/O bandwidth but will protect the data in case of such power outages.
P.S. Code::Blocks moved the old file to .temp, created the new .cpp file and the OS reported that as a success even though it was still pending in the write cache.
Navigation
[0] Message Index
[*] Previous page
Go to full version