PhotoRec: try to distinguish Go .go from Python .py files
This commit is contained in:
parent
53bc92e1ca
commit
365499b706
1 changed files with 6 additions and 0 deletions
|
@ -135,6 +135,8 @@ static const txt_header_t fasttxt_headers[] = {
|
||||||
"emka"
|
"emka"
|
||||||
#endif
|
#endif
|
||||||
},
|
},
|
||||||
|
/* Source code in go language */
|
||||||
|
{ "package main", 12, "go"},
|
||||||
/* ENVI */
|
/* ENVI */
|
||||||
{ "ENVI\r\ndescription", 17, "hdr"},
|
{ "ENVI\r\ndescription", 17, "hdr"},
|
||||||
/* Java Application Descriptor
|
/* Java Application Descriptor
|
||||||
|
@ -1258,6 +1260,10 @@ static int header_check_txt(const unsigned char *buffer, const unsigned int buff
|
||||||
ext="java";
|
ext="java";
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
else if((str=strstr(buffer_lower, "\nimport ("))!=NULL)
|
||||||
|
{
|
||||||
|
ext="go";
|
||||||
|
}
|
||||||
else if((str=strstr(buffer_lower, "\nimport "))!=NULL)
|
else if((str=strstr(buffer_lower, "\nimport "))!=NULL)
|
||||||
{
|
{
|
||||||
str+=8;
|
str+=8;
|
||||||
|
|
Loading…
Reference in a new issue