From 2d62f25b7f5da9b34e28a0e8ccbdd1ca1077ff1f Mon Sep 17 00:00:00 2001 From: Christophe Grenier Date: Mon, 19 May 2008 00:00:05 +0200 Subject: [PATCH] Disable RepairMFT if partition has been found using backup boot sector. --- src/ntfs_fix.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/ntfs_fix.c b/src/ntfs_fix.c index 5a49ffa7..7cdddaef 100644 --- a/src/ntfs_fix.c +++ b/src/ntfs_fix.c @@ -136,6 +136,15 @@ int repair_MFT(disk_t *disk_car, partition_t *partition, const int verbose, cons free(ntfs_header); return 0; } + if(partition->sb_offset!=0) + { + log_info("Please quit TestDisk and reboot your computer before trying to fix the MFT.\n"); + display_message("Please quit TestDisk and reboot your computer before trying to fix the MFT.\n"); + free(buffer_mftmirr); + free(buffer_mft); + free(ntfs_header); + return -1; + } /* log_debug("MFT\n"); dump_log(buffer_mft, mftmirr_size_bytes);