PhotoRec: avoid extension with more than 3 letters for DOS/DJGPP version
This commit is contained in:
parent
38539a2f59
commit
93fc52322b
8 changed files with 32 additions and 0 deletions
|
@ -142,7 +142,11 @@ static int header_check_dump(const unsigned char *buffer, const unsigned int buf
|
|||
le32(dump->c_type)==TS_TAPE)
|
||||
{
|
||||
reset_file_recovery(file_recovery_new);
|
||||
#ifdef DJGPP
|
||||
file_recovery_new->extension="dmp";
|
||||
#else
|
||||
file_recovery_new->extension=file_hint_dump.extension;
|
||||
#endif
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
|
|
|
@ -62,7 +62,11 @@ static int header_check_fh10(const unsigned char *buffer, const unsigned int buf
|
|||
{
|
||||
reset_file_recovery(file_recovery_new);
|
||||
file_recovery_new->min_filesize=4096;
|
||||
#ifdef DJGPP
|
||||
file_recovery_new->extension="fh1";
|
||||
#else
|
||||
file_recovery_new->extension=file_hint_fh10.extension;
|
||||
#endif
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
|
|
|
@ -76,7 +76,11 @@ static int header_check_fits(const unsigned char *buffer, const unsigned int buf
|
|||
unsigned int i=0;
|
||||
uint64_t naxis_size_max=0;
|
||||
reset_file_recovery(file_recovery_new);
|
||||
#ifdef DJGPP
|
||||
file_recovery_new->extension="fts";
|
||||
#else
|
||||
file_recovery_new->extension=file_hint_fits.extension;
|
||||
#endif
|
||||
file_recovery_new->min_filesize=2880;
|
||||
file_recovery_new->data_check=&data_check_size;
|
||||
file_recovery_new->file_check=&file_check_size;
|
||||
|
|
|
@ -56,7 +56,11 @@ static int header_check_flac(const unsigned char *buffer, const unsigned int buf
|
|||
if(memcmp(buffer, flac_header, sizeof(flac_header))==0)
|
||||
{
|
||||
reset_file_recovery(file_recovery_new);
|
||||
#ifdef DJGPP
|
||||
file_recovery_new->extension="flc";
|
||||
#else
|
||||
file_recovery_new->extension=file_hint_flac.extension;
|
||||
#endif
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
|
|
|
@ -72,7 +72,11 @@ static int header_check_indd(const unsigned char *buffer, const unsigned int buf
|
|||
if (memcmp(hdr->id,indd_header,sizeof(indd_header))==0)
|
||||
{
|
||||
reset_file_recovery(file_recovery_new);
|
||||
#ifdef DJGPP
|
||||
file_recovery_new->extension="ind";
|
||||
#else
|
||||
file_recovery_new->extension=file_hint_indd.extension;
|
||||
#endif
|
||||
file_recovery_new->calculated_file_size=(uint64_t)(1+le32(hdr->blocks))*4096;
|
||||
file_recovery_new->file_check=&file_check_indd;
|
||||
// log_debug("header_check_indd: Guessed length: %lu.\n", indd_file_size);
|
||||
|
|
|
@ -72,7 +72,11 @@ static int header_check_m2ts(const unsigned char *buffer, const unsigned int buf
|
|||
memcmp(&buffer[0xe8], hdmv_header, sizeof(hdmv_header))==0)
|
||||
{
|
||||
reset_file_recovery(file_recovery_new);
|
||||
#ifdef DJGPP
|
||||
file_recovery_new->extension="m2t";
|
||||
#else
|
||||
file_recovery_new->extension=file_hint_m2ts.extension;
|
||||
#endif
|
||||
file_recovery_new->min_filesize=192;
|
||||
file_recovery_new->calculated_file_size=192;
|
||||
file_recovery_new->data_check=&data_check_m2ts;
|
||||
|
|
|
@ -56,7 +56,11 @@ static int header_check_pcap(const unsigned char *buffer, const unsigned int buf
|
|||
if(memcmp(buffer, pcap_header, sizeof(pcap_header))==0)
|
||||
{
|
||||
reset_file_recovery(file_recovery_new);
|
||||
#ifdef DJGPP
|
||||
file_recovery_new->extension="pcp";
|
||||
#else
|
||||
file_recovery_new->extension=file_hint_pcap.extension;
|
||||
#endif
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
|
|
|
@ -86,7 +86,11 @@ static int header_check_vmdk(const unsigned char *buffer, const unsigned int buf
|
|||
memcmp(buffer,vmdk_header4, sizeof(vmdk_header4))==0)
|
||||
{
|
||||
reset_file_recovery(file_recovery_new);
|
||||
#ifdef DJGPP
|
||||
file_recovery_new->extension="vmd";
|
||||
#else
|
||||
file_recovery_new->extension=file_hint_vmdk.extension;
|
||||
#endif
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
|
|
Loading…
Reference in a new issue