Code::Blocks Forums

User forums => Help => Topic started by: Stefan923 on March 25, 2020, 12:01:32 am

Title: Accidental reloading of the source file main.c
Post by: Stefan923 on March 25, 2020, 12:01:32 am
Hello,

I've accidentaly reloaded my main.c source file after Codeblocks told me that the file was modifyed in external. The IDE have copied my code from a header file I that has been opened, to the lost main.c file.
Now, I am curious if there is any way to recover my code. I still have the main.o file which contains the old code. Can I use this file to recover my main.c file?
Title: Re: Accidental reloading of the source file main.c
Post by: oBFusCATed on March 25, 2020, 01:39:06 am
If you've not setup autosave plugin to do backups, or have similar os solutions the file would be gone.

Now is the time to learn how to use a https://en.wikipedia.org/wiki/Version_control
Title: Re: Accidental reloading of the source file main.c
Post by: raynebc on March 25, 2020, 03:35:37 pm
If you're using Windows, it may have made a shadow copy backup.  Go to the folder's properties in a File Explorer window, select the previous versions tab and see if it lists a backup from a time before your file was overwritten.
Title: Re: Accidental reloading of the source file main.c
Post by: Stefan923 on March 25, 2020, 05:16:37 pm
If you're using Windows, it may have made a shadow copy backup.  Go to the folder's properties in a File Explorer window, select the previous versions tab and see if it lists a backup from a time before your file was overwritten.

There's no backup file :(