PhotoRec: recover Revit .rvt files
This commit is contained in:
parent
636fcb513d
commit
253ff50b44
4 changed files with 15 additions and 8 deletions
|
@ -245,7 +245,7 @@ static const char *ole_get_file_extension(const unsigned char *buffer, const uns
|
|||
}
|
||||
for(;j<64;j+=2)
|
||||
log_info(" ");
|
||||
log_info(" type %u", dir_entry->type);
|
||||
log_info(" namsiz=%u type %u", le16(dir_entry->namsiz), dir_entry->type);
|
||||
log_info(" Flags=%s", (dir_entry->bflags==0?"Red ":"Black"));
|
||||
log_info(" sector %u (%u bytes)\n",
|
||||
(unsigned int)le32(dir_entry->start_block),
|
||||
|
@ -310,6 +310,11 @@ static const char *ole_get_file_extension(const unsigned char *buffer, const uns
|
|||
#endif
|
||||
}
|
||||
break;
|
||||
case 32:
|
||||
/* Revit */
|
||||
if(memcmp(dir_entry->name, "R\0e\0v\0i\0t\0P\0r\0e\0v\0i\0e\0w\0004\0.\0000\0\0", 32)==0)
|
||||
return "rvt";
|
||||
break;
|
||||
case 34:
|
||||
if(memcmp(dir_entry->name, "S\0t\0a\0r\0C\0a\0l\0c\0D\0o\0c\0u\0m\0e\0n\0t\0\0\0",34)==0)
|
||||
return "sdc";
|
||||
|
|
|
@ -37,6 +37,7 @@
|
|||
static void register_header_check_gz(file_stat_t *file_stat);
|
||||
static int header_check_gz(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);
|
||||
static void file_rename_gz(file_recovery_t *file_recovery);
|
||||
extern const file_hint_t file_hint_doc;
|
||||
|
||||
const file_hint_t file_hint_gz= {
|
||||
.extension="gz",
|
||||
|
@ -123,6 +124,12 @@ static int header_check_gz(const unsigned char *buffer, const unsigned int buffe
|
|||
}
|
||||
if(off >= 512 || off >= buffer_size)
|
||||
return 0;
|
||||
if(file_recovery->file_stat!=NULL &&
|
||||
file_recovery->file_stat->file_hint==&file_hint_doc)
|
||||
{
|
||||
header_ignored(file_recovery_new);
|
||||
return 0;
|
||||
}
|
||||
#if defined(HAVE_ZLIB_H) && defined(HAVE_LIBZ)
|
||||
{
|
||||
static const unsigned char schematic_header[12]={ 0x0a, 0x00, 0x09,
|
||||
|
|
|
@ -130,9 +130,7 @@ static int header_check_png(const unsigned char *buffer, const unsigned int buff
|
|||
return 0;
|
||||
/* SolidWorks files contains a png */
|
||||
if(file_recovery->file_stat!=NULL &&
|
||||
file_recovery->file_stat->file_hint==&file_hint_doc &&
|
||||
(strcmp(file_recovery->extension,"sld")==0 ||
|
||||
strcmp(file_recovery->extension,"sldprt")==0))
|
||||
file_recovery->file_stat->file_hint==&file_hint_doc)
|
||||
{
|
||||
header_ignored(file_recovery_new);
|
||||
return 0;
|
||||
|
|
|
@ -776,10 +776,7 @@ static int header_check_zip(const unsigned char *buffer, const unsigned int buff
|
|||
log_trace("header_check_zip\n");
|
||||
#endif
|
||||
if(file_recovery->file_stat!=NULL &&
|
||||
file_recovery->file_stat->file_hint==&file_hint_doc &&
|
||||
(strcmp(file_recovery->extension,"doc")==0 ||
|
||||
strcmp(file_recovery->extension,"psmodel")==0)
|
||||
&& memcmp(&buffer[30], "macrolog_1.mac", 14)==0)
|
||||
file_recovery->file_stat->file_hint==&file_hint_doc)
|
||||
{
|
||||
header_ignored(file_recovery_new);
|
||||
return 0;
|
||||
|
|
Loading…
Reference in a new issue