summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/file_x3f.c8
-rw-r--r--src/file_x3i.c1
2 files changed, 9 insertions, 0 deletions
diff --git a/src/file_x3f.c b/src/file_x3f.c
index 896ac1a..0cba13f 100644
--- a/src/file_x3f.c
+++ b/src/file_x3f.c
@@ -31,6 +31,7 @@
#include "filegen.h"
#include "common.h"
+extern const file_hint_t file_hint_x3i;
static void register_header_check_x3f(file_stat_t *file_stat);
static int header_check_x3f(const unsigned char *buffer, const unsigned int buffer_size, const unsigned int safe_header_only, const file_recovery_t *file_recovery, file_recovery_t *file_recovery_new);
@@ -63,8 +64,15 @@ static int header_check_x3f(const unsigned char *buffer, const unsigned int buff
return 0;
if(rotation!=0 && rotation!=90 && rotation!=180 && rotation!=270)
return 0;
+ if(file_recovery->file_stat!=NULL &&
+ file_recovery->file_stat->file_hint==&file_hint_x3i &&
+ safe_header_only==0)
+ {
+ return 0;
+ }
reset_file_recovery(file_recovery_new);
file_recovery_new->extension=file_hint_x3f.extension;
+ file_recovery_new->min_filesize=1024;
return 1;
}
diff --git a/src/file_x3i.c b/src/file_x3i.c
index b4b9b93..c1a001f 100644
--- a/src/file_x3i.c
+++ b/src/file_x3i.c
@@ -45,6 +45,7 @@ static int header_check_x3i(const unsigned char *buffer, const unsigned int buff
{
reset_file_recovery(file_recovery_new);
file_recovery_new->extension=file_hint_x3i.extension;
+ file_recovery_new->min_filesize=1024;
return 1;
}