You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
#rb Per.Larsson #rnx #preflight 60f9212d1f926d0001d41223 * VirtualizationJupiterBackend - When pulling a payload we should assume that a 400 error response when trying to GET the payload header means that the payload is not in Jupiter. -- Not being able to find the payload should not log an error, instead we can make a note of it in the verbose log (similar to the file system backend) * VirtualizationFileBackend - Moved the formatting of system errors to it's own function. - Log the system error when failing to write a payload during a push as well as a pull. - We now check that the FileArchive wrote correctly to disk and delete the output file and fail the push if it did not. -- A future piece of work will change the logic to write to a tmp file at the root of the file store and them move the file to the final location to cut down on the potential of leaving corrupted files around (similar to the process when we save packages) * Perforce - The FDownloadFile command now takes an optional parameter EVerbosity that can allow the caller to choose the level of logging output that the command will generate. - The source control backend for Mirage now opts to supress the logging of the full perforce command when we are pulling payloads as we can generate many hundreds or thousands of requests and the info is not useful to users. -- We continue to log the command when validating the depot as this is the most likely command to fail so having the info in the log may prove useful. [CL 16921815 by paul chipchase in ue5-main branch]
26 lines
956 B
C++
26 lines
956 B
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#include "SourceControlOperations.h"
|
|
|
|
#include "Containers/StringView.h"
|
|
#include "ISourceControlModule.h"
|
|
#include "Misc/Paths.h"
|
|
|
|
FDownloadFile::FDownloadFile(FStringView InTargetDirectory, EVerbosity InVerbosity)
|
|
: Verbosity(InVerbosity)
|
|
, TargetDirectory(InTargetDirectory)
|
|
{
|
|
FPaths::NormalizeDirectoryName(TargetDirectory);
|
|
|
|
// Due to the asynchronous nature of the source control api, it might be some time before
|
|
// the TargetDirectory is actually used. So we do a validation pass on it now to try and
|
|
// give errors close to the point that they were created. The caller is still free to try
|
|
// and use the FDownloadFile but with an invalid path it probably won't work.
|
|
FText Reason;
|
|
if (!FPaths::ValidatePath(TargetDirectory, &Reason))
|
|
{
|
|
UE_LOG(LogSourceControl, Error, TEXT("Path '%s' passed to FDownloadFile is invalid due to: %s"),
|
|
*TargetDirectory, *Reason.ToString());
|
|
}
|
|
}
|