Image file preallocation

This commit is contained in:
Jack Andersen 2016-02-02 10:42:17 -10:00
parent 528b5cad0c
commit 39e9cea094
2 changed files with 6 additions and 0 deletions

View File

@ -239,6 +239,9 @@ bool DiscBuilderGCN::buildFromDirectory(const SystemChar* dirIn, const SystemCha
LogModule.report(LogVisor::Error, _S("not enough free disk space for %s"), m_outPath);
return false;
}
++m_progressIdx;
m_progressCB(m_progressIdx, _S("Preallocating image"), -1);
m_fileIO->beginWriteStream(0x57058000 - 1)->write("", 1);
PartitionBuilderGCN& pb = static_cast<PartitionBuilderGCN&>(*m_partitions[0]);
return pb.buildFromDirectory(dirIn, dolIn, apploaderIn);

View File

@ -861,6 +861,9 @@ bool DiscBuilderWii::buildFromDirectory(const SystemChar* dirIn, const SystemCha
LogModule.report(LogVisor::Error, _S("not enough free disk space for %s"), m_outPath);
return false;
}
++m_progressIdx;
m_progressCB(m_progressIdx, _S("Preallocating image"), -1);
m_fileIO->beginWriteStream(DISC_CAPACITY - 1)->write("", 1);
/* Assemble image */
filledSz = pb.buildFromDirectory(dirIn, dolIn, apploaderIn, partHeadIn);