From 455442f301f0b113f35620786db20b3f5fe9d227 Mon Sep 17 00:00:00 2001 From: Christophe Grenier Date: Sat, 23 Mar 2013 14:51:44 +0100 Subject: [PATCH] PhotoRec: disable jpg detection during .albm file recovery --- src/file_jpg.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/file_jpg.c b/src/file_jpg.c index e220eee8..f7190a5e 100644 --- a/src/file_jpg.c +++ b/src/file_jpg.c @@ -49,6 +49,7 @@ #include "file_tiff.h" #include "setdate.h" +extern const file_hint_t file_hint_doc; extern const file_hint_t file_hint_indd; extern const file_hint_t file_hint_mov; extern const file_hint_t file_hint_riff; @@ -260,6 +261,9 @@ static int header_check_jpg(const unsigned char *buffer, const unsigned int buff jpg_get_size(buffer, buffer_size, &height, &width); if(file_recovery->file_stat->file_hint==&file_hint_indd) return 0; + if(file_recovery->file_stat->file_hint==&file_hint_doc && + strstr(file_recovery->filename, ".albm")!=NULL) + return 0; if( file_recovery->file_stat->file_hint==&file_hint_jpg) { /* Don't recover the thumb instead of the jpg itself */