Move begin/end cache file update calls into move/copy code
This commit is contained in:
@@ -88,6 +88,10 @@ namespace AssetUtilsInternal
|
||||
timer.start();
|
||||
do
|
||||
{
|
||||
QString normalized = AssetUtilities::NormalizeFilePath(outputFile);
|
||||
AssetProcessor::ProcessingJobInfoBus::Broadcast(
|
||||
&AssetProcessor::ProcessingJobInfoBus::Events::BeginCacheFileUpdate, normalized.toUtf8().constData());
|
||||
|
||||
//Removing the old file if it exists
|
||||
if (outFile.exists())
|
||||
{
|
||||
@@ -139,10 +143,17 @@ namespace AssetUtilsInternal
|
||||
}
|
||||
} while (!timer.hasExpired(waitTimeInSeconds * 1000)); //We will keep retrying until the timer has expired the inputted timeout
|
||||
|
||||
// note that this absolute path is a real file system path, and the following API requires normalized paths:
|
||||
QString normalized = AssetUtilities::NormalizeFilePath(outputFile);
|
||||
AssetProcessor::ProcessingJobInfoBus::Broadcast(
|
||||
&AssetProcessor::ProcessingJobInfoBus::Events::EndCacheFileUpdate, normalized.toUtf8().constData(), !operationSucceeded);
|
||||
|
||||
if (!operationSucceeded)
|
||||
{
|
||||
//operation failed for the given timeout
|
||||
AZ_Warning(AssetProcessor::ConsoleChannel, false, "WARNING: Could not copy/move source %s to %s, giving up\n", sourceFile.toUtf8().constData(), outputFile.toUtf8().constData());
|
||||
AZ_Warning(AssetProcessor::ConsoleChannel, false, "WARNING: Could not %s source from %s to %s, giving up\n",
|
||||
isCopy ? "copy" : "move (via rename)",
|
||||
sourceFile.toUtf8().constData(), outputFile.toUtf8().constData());
|
||||
return false;
|
||||
}
|
||||
else if (failureOccurredOnce)
|
||||
|
||||
Reference in New Issue
Block a user