summaryrefslogtreecommitdiffstats
path: root/src/file_txt.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/file_txt.c')
-rw-r--r--src/file_txt.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/file_txt.c b/src/file_txt.c
index 377dbd0..48358da 100644
--- a/src/file_txt.c
+++ b/src/file_txt.c
@@ -807,8 +807,7 @@ static int header_check_txt(const unsigned char *buffer, const unsigned int buff
return 1;
}
}
- if(strncasecmp((const char *)buffer, "@echo off", 9)==0 ||
- strncasecmp((const char *)buffer, "rem ", 4)==0)
+ if(strncasecmp((const char *)buffer, "@echo off", 9)==0)
{
reset_file_recovery(file_recovery_new);
file_recovery_new->data_check=&data_check_txt;
@@ -905,6 +904,15 @@ static int header_check_txt(const unsigned char *buffer, const unsigned int buff
l=UTF2Lat((unsigned char*)buffer_lower, buffer, buffer_size_test);
if(l<10)
return 0;
+ if(strncasecmp((const char *)buffer, "rem ", 4)==0)
+ {
+ reset_file_recovery(file_recovery_new);
+ file_recovery_new->data_check=&data_check_txt;
+ file_recovery_new->file_check=&file_check_size;
+ /* Dos/Windows bath */
+ file_recovery_new->extension="bat";
+ return 1;
+ }
{
const char *ext=NULL;
/* ind=~0: random