Simplify detection of .projectstore file by using the relative content root

#rb pj.kack
#preflight 646e26bf64351d76f3a675ea

[CL 25617036 by dan engelbrecht in ue5-main branch]
This commit is contained in:
dan engelbrecht
2023-05-25 03:42:09 -04:00
parent 5756f69fdb
commit ea0aa7d6b5
@@ -255,19 +255,10 @@ TUniquePtr<FArchive> FStorageServerPlatformFile::TryFindProjectStoreMarkerFile(I
{
return nullptr;
}
FString RootDir = FPaths::ConvertRelativePathToFull(FPaths::RootDir());
FString CookedDir = FPaths::ConvertRelativePathToFull(FPaths::Combine(*FPaths::ProjectDir(), TEXT("Saved"), TEXT("Cooked"), FPlatformProperties::PlatformName()));
TArray<FString> PotentialProjectStorePaths;
PotentialProjectStorePaths.Add(RootDir);
PotentialProjectStorePaths.Add(CookedDir);
for (const FString& ProjectStorePath : PotentialProjectStorePaths)
const TCHAR* ProjectMarkerPath = TEXT("../../../.projectstore");
if (IFileHandle* ProjectStoreMarkerHandle = Inner->OpenRead(ProjectMarkerPath); ProjectStoreMarkerHandle != nullptr)
{
FString ProjectMarkerPath = ProjectStorePath / TEXT(".projectstore");
if (IFileHandle* ProjectStoreMarkerHandle = Inner->OpenRead(*ProjectMarkerPath); ProjectStoreMarkerHandle != nullptr)
{
return TUniquePtr<FArchive>(new FArchiveFileReaderGeneric(ProjectStoreMarkerHandle, *ProjectMarkerPath, ProjectStoreMarkerHandle->Size()));
}
return TUniquePtr<FArchive>(new FArchiveFileReaderGeneric(ProjectStoreMarkerHandle, ProjectMarkerPath, ProjectStoreMarkerHandle->Size()));
}
return nullptr;
}