PhotoRec: try to distinguish Go .go from Python .py files

This commit is contained in:
Christophe Grenier 2016-06-05 10:07:58 +02:00
parent 53bc92e1ca
commit 365499b706

View file

@ -135,6 +135,8 @@ static const txt_header_t fasttxt_headers[] = {
"emka"
#endif
},
/* Source code in go language */
{ "package main", 12, "go"},
/* ENVI */
{ "ENVI\r\ndescription", 17, "hdr"},
/* Java Application Descriptor
@ -1258,6 +1260,10 @@ static int header_check_txt(const unsigned char *buffer, const unsigned int buff
ext="java";
#endif
}
else if((str=strstr(buffer_lower, "\nimport ("))!=NULL)
{
ext="go";
}
else if((str=strstr(buffer_lower, "\nimport "))!=NULL)
{
str+=8;