cgsecurity / testdisk

TestDisk & PhotoRec
https://www.cgsecurity.org/
GNU General Public License v2.0
1.55k stars 190 forks source link

Support for restoring JSON files that begin with squared brackets #60

Open fatmali opened 5 years ago

fatmali commented 5 years ago

This is a great library! I recently tried to restore a JSON file and it wasn't working. After looking at the code, I realized that testdisk only restores JSON files starting with a '{'. It would be nice to also have supports for those starting with '['. Looking forward to a response :-)

cgsecurity commented 5 years ago

Actually JSON starting with '[' should be recovered by PhotoRec as .txt Check if the first char is '[' may be too weak to identify correctly a json... TestDisk Undelete feature (menu Advanced) may be more efficient.