make a copy of original models file when baking domain

This commit is contained in:
Stephen Birarda 2017-05-18 09:29:04 -07:00
parent 499897e271
commit a7f154a853

View file

@ -100,6 +100,15 @@ void DomainBaker::loadLocalFile() {
// load up the local entities file
QFile entitiesFile { _localEntitiesFileURL.toLocalFile() };
// first make a copy of the local entities file in our output folder
if (!entitiesFile.copy(_uniqueOutputPath + "/" + "original-" + _localEntitiesFileURL.fileName())) {
// add an error to our list to specify that the file could not be copied
handleError("Could not make a copy of entities file");
// return to stop processing
return;
}
if (!entitiesFile.open(QIODevice::ReadOnly)) {
// add an error to our list to specify that the file could not be read
handleError("Could not open entities file");