Description

User reported.

UResavePackagesCommandlet::CheckoutFile(const FString& Filename, bool bAddFile = false, bool bIgnoreAlreadyCheckedOut = false)

has a parameter to ignore files that are already checked out. When this is true, there is still an error message logged when checkout fails, while a reason checkout can fail is because it was already checked out:

			if (CheckoutFile(PackageFilename, true, bIgnoreAlreadyCheckedOut))
			{
				SublevelFilenames.Add(PackageFilename);
				if (!SavePackageHelper(Package, PackageFilename))
				{
					UE_LOG(LogContentCommandlet, Error, TEXT("Failed to save existing package %s"), *PackageFilename);
				}
			}
			else
			{
				UE_LOG(LogContentCommandlet, Error, TEXT("Failed to check out existing package %s"), *PackageFilename);
			}

However, checkout can fail due to a multitude of reasons.

Suggestion: change the return type of Checkout() to also provide a reason. Skip the error log if but only if the reason was that it was already checked out.

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-175738 in the post.

2
Login to Vote

Backlogged
ComponentUE - Foundation - Cpp Tools - Automation Tool
Affects Versions5.1
Target Fix5.6
CreatedFeb 1, 2023
UpdatedOct 25, 2024
View Jira Issue