PhotoRec: modify .indd recovery to not use min_header_distance anymore
This commit is contained in:
parent
d5b19fa0e1
commit
1ebca60563
1 changed files with 5 additions and 1 deletions
|
@ -46,7 +46,7 @@ static void file_check_indd(file_recovery_t *file_recovery);
|
|||
const file_hint_t file_hint_indd= {
|
||||
.extension="indd",
|
||||
.description="InDesign File",
|
||||
.min_header_distance=8192,
|
||||
.min_header_distance=0,
|
||||
.max_filesize=PHOTOREC_MAX_FILE_SIZE,
|
||||
.recover=1,
|
||||
.enable_by_default=1,
|
||||
|
@ -124,6 +124,10 @@ static int header_check_indd(const unsigned char *buffer, const unsigned int buf
|
|||
const struct InDesignMasterPage *hdr0 = (const struct InDesignMasterPage *)buffer;
|
||||
const struct InDesignMasterPage *hdr1 = (const struct InDesignMasterPage *)&buffer[4096];
|
||||
hdr=(le64(hdr0->fSequenceNumber) > le64(hdr1->fSequenceNumber) ? hdr0 : hdr1);
|
||||
if(file_recovery->file_stat!=NULL &&
|
||||
file_recovery->file_stat->file_hint==&file_hint_indd &&
|
||||
file_recovery->file_size <= 8192)
|
||||
return 0;
|
||||
if(hdr->fObjectStreamEndian!=1 && hdr->fObjectStreamEndian!=2)
|
||||
return 0;
|
||||
if(le32(hdr->fFilePages)==0)
|
||||
|
|
Loading…
Reference in a new issue