summaryrefslogtreecommitdiffstats
path: root/src/file_x3f.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/file_x3f.c')
-rw-r--r--src/file_x3f.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/file_x3f.c b/src/file_x3f.c
index 896ac1a..e92a2c4 100644
--- a/src/file_x3f.c
+++ b/src/file_x3f.c
@@ -20,6 +20,7 @@
*/
+#if !defined(SINGLE_FORMAT) || defined(SINGLE_FORMAT_x3f)
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
@@ -31,6 +32,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 +65,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;
}
@@ -73,3 +82,4 @@ static void register_header_check_x3f(file_stat_t *file_stat)
static const unsigned char x3f_header[4]= {'F','O','V','b'};
register_header_check(0, x3f_header,sizeof(x3f_header), &header_check_x3f, file_stat);
}
+#endif