Merge pull request #3181 from JosJuice/scrub-directories

Don't reserve space for directories when scrubbing
This commit is contained in:
Scott Mansell 2015-11-17 10:37:09 +13:00
commit eddea7f15f
1 changed files with 1 additions and 4 deletions

View File

@ -314,10 +314,7 @@ bool ParsePartitionData(SPartition& _rPartition)
for (SFileInfo file : filesystem->GetFileList())
{
DEBUG_LOG(DISCIO, "%s", file.m_FullPath.empty() ? "/" : file.m_FullPath.c_str());
// Just 1byte for directory? - it will end up reserving a cluster this way
if (file.m_NameOffset & 0x1000000)
MarkAsUsedE(_rPartition.Offset + _rPartition.Header.DataOffset, file.m_Offset, 1);
else
if ((file.m_NameOffset & 0x1000000) == 0)
MarkAsUsedE(_rPartition.Offset + _rPartition.Header.DataOffset, file.m_Offset, file.m_FileSize);
}
}