You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
25 lines
906 B
C++
25 lines
906 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)
|
||
|
|
: 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());
|
||
|
|
}
|
||
|
|
}
|