summaryrefslogtreecommitdiffstats
path: root/src/file_exs.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2015-06-12 19:49:50 +0200
committerChristophe Grenier <grenier@cgsecurity.org>2015-06-12 19:49:50 +0200
commit04d653114489586908a37b6f405340fdcb9a3824 (patch)
tree6ecd19bcbadcfdb1b575402ff5856991f80cbbee /src/file_exs.c
parent56e27e660059e73f1315f83c660fc358c02e41d7 (diff)
PhotoRec: log the correct filename if file has been renamed
Diffstat (limited to 'src/file_exs.c')
-rw-r--r--src/file_exs.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/file_exs.c b/src/file_exs.c
index 370f292..0b1cd26 100644
--- a/src/file_exs.c
+++ b/src/file_exs.c
@@ -42,16 +42,16 @@ const file_hint_t file_hint_exs= {
.register_header_check=&register_header_check_exs
};
-static void file_rename_exs(const char *old_filename)
+static void file_rename_exs(file_recovery_t *file_recovery)
{
unsigned char buffer[512];
FILE *file;
int buffer_size;
- if((file=fopen(old_filename, "rb"))==NULL)
+ if((file=fopen(file_recovery->filename, "rb"))==NULL)
return;
buffer_size=fread(buffer, 1, sizeof(buffer), file);
fclose(file);
- file_rename(old_filename, buffer, buffer_size, 0x14, "exs", 0);
+ file_rename(file_recovery, buffer, buffer_size, 0x14, "exs", 0);
}
static int header_check_exs(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)