From 84c325234b246ac81aa272368f2f876684e16679 Mon Sep 17 00:00:00 2001 From: Christophe Grenier Date: Sun, 28 Aug 2016 08:17:25 +0200 Subject: [PATCH] PhotoRec: do not recover .pct files while a .indd recovery is in progress --- src/file_pct.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/file_pct.c b/src/file_pct.c index cfc1460b..49899c9d 100644 --- a/src/file_pct.c +++ b/src/file_pct.c @@ -31,6 +31,7 @@ #include "common.h" #include "log.h" +extern const file_hint_t file_hint_indd; static void register_header_check_pct(file_stat_t *file_stat); static int header_check_pct(const unsigned char *buffer, const unsigned int buffer_size, const unsigned int safe_header_only, const file_recovery_t *file_recovery, file_recovery_t *file_recovery_new); static void file_check_pct(file_recovery_t *file_recovery); @@ -93,6 +94,12 @@ static int header_check_pct(const unsigned char *buffer, const unsigned int buff be16(pct->VersionOperator)==0x0011 && be16(pct->VersionNumber)==0x02ff) { + if(file_recovery->file_stat != NULL && + file_recovery->file_stat->file_hint==&file_hint_indd) + { + header_ignored(file_recovery_new); + return 0; + } reset_file_recovery(file_recovery_new); file_recovery_new->extension=file_hint_pct.extension; /* We only have the low 16bits of the filesystem */