fixed clearing the end of extents when extracting metadata

When extracting the metadata, unused data at the end of MFT records is
supposed to be cleared. This was done for the base record of each file,
but not for the extent records.
edge.strict_endians
Jean-Pierre André 2012-01-23 17:11:46 +01:00
parent 4ce33daf6c
commit 5593ee2711
1 changed files with 6 additions and 1 deletions

View File

@ -1407,8 +1407,13 @@ static int walk_clusters(ntfs_volume *volume, struct ntfs_walk_cluster *walk)
walk->image->ni = ni;
walk_attributes(walk);
out:
if (wipe) {
if (wipe && !opt.metadata_image) {
int i;
wipe_unused_mft_data(ni);
for (i = 0; i < ni->nr_extents; ++i) {
wipe_unused_mft_data(ni->extent_nis[i]);
}
mft_inode_write_with_same_usn(volume, ni);
}