0

recover.c is creating the correct number of file with the correct names, but they're all empty (0 bytes)...

To conform with the honor code, I've posted the code as a gist: https://gist.github.com/aryamanarora/07221c170d3833e2445d5e92ba7ca87f

Thanks for the help!

0

I was able to fix this by unloading the while loop that writes to the new file from the if loop, and turning it into something like:

if (currentfile != NULL)
{
    fwrite(&buffer, 512 * sizeof(BYTE), 1, currentfile);
}

Also use valgrind to check for memory leaks!

| improve this answer | |

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .