This question was created in reference to: [Changelist validation error: FPathExistence failed to gather correct capitalization from [Content removed]
We have some kind of same issue but with Junctions on Jenkins.
We are on 5.7.4 and everything was working fine before (and of course : it works on my machine
)
The issue happens only on Jenkins as it is using junctions.
What would be the best fix for that as the other one didn’t work?
Thanks
[Attachment Removed]
Steps to Reproduce
When cooking on our build system (Jenkins) we have thousands of warnig like that :
LogInit: Display: LogAssetRegistry: Warning: FPathExistence failed to gather correct capitalization from disk for X:/J/MyProject/Content/Blueprints/Environment/BP_SomeBP_B_Sleeping.uasset, because GetFilenameOnDisk returned non-matching filename 'D:/jwrk/pXX/workspace/MyProject-dev+ArtAudio/J/MyProject/Content/Blueprints/Environment/BP_SomeBP_B_Sleeping.uasset'.
LogInit: Display: LogAssetRegistry: Warning: FPathExistence failed to gather correct capitalization from disk for X:/J/MyProject/Content/Blueprints/Environment/BP_SomeBP_B.uasset, because GetFilenameOnDisk returned non-matching filename 'D:/jwrk/pXX/workspace/MyProject-dev+ArtAudio/J/MyProject/Content/Blueprints/Environment/BP_SomeBP_B.uasset'.
LogInit: Display: LogAssetRegistry: Warning: FPathExistence failed to gather correct capitalization from disk for X:/J/MyProject/Content/Blueprints/Environment/BP_SomeBP_Base.uasset, because GetFilenameOnDisk returned non-matching filename 'D:/jwrk/pXX/workspace/MyProject-dev+ArtAudio/J/MyProject/Content/Blueprints/Environment/BP_SomeBP_Base.uasset'.
LogInit: Display: LogAssetRegistry: Warning: FPathExistence failed to gather correct capitalization from disk for X:/J/MyProject/Content/NeverRelease/DebugUtilities/DebugBlueprintActors/BP_WeaponDummy.uasset, because GetFilenameOnDisk returned non-matching filename 'D:/jwrk/pXX/workspace/MyProject-dev+ArtAudio/J/MyProject/Content/NeverRelease/DebugUtilities/DebugBlueprintActors/BP_WeaponDummy.uasset'.
We applied the fix in [Changelist validation error: FPathExistence failed to gather correct capitalization from [Content removed] but it didn’t work
[Attachment Removed]
[mention removed]​ [mention removed]​ for visibility
[Attachment Removed]
We haven’t received any other reports of the fix failing, and we haven’t seen it internally. Can you write some debug instrumentation to find out why it is not working?
In TryFixSymlinkCapitalization, add an initial one-time-only log and then a log after the early exit, to see whether any junctions are detected at all:
bool TryFixSymlinkCapitalization(FString& LocalAbsPath, FString& CorrectedCapitalization)
{
// New code block, make sure this function is getting called:
static bool bInitialized = []()
{
UE_LOG(LogAssetRegistry, Display, TEXT("Junctions: TryFixSimlinkCapitalization has been called."));
return true;
}();
// try to find the last junction / symlink
FString Path = FString(FPathViews::GetPath(LocalAbsPath));
while (!Path.IsEmpty() && !IFileManager::Get().IsSymlink(*Path))
{
Path = FString(FPathViews::GetPath(Path));
}
// We couldn't find a symlink on the path, we don't know why the capitalization is wrong.
if (Path.IsEmpty())
{
return false;
}
// New log
UE_LOG(LogAssetRegistry, Display, TEXT("Junctions: Found Junction for Path %s."), *Path);
And then in the other location where it can return false, add a log with the information about why its failing:
// we expect something like: [junction]/foo/bar.uasset <-> [fullpath]/Foo/BAR.uasset
if (!LocalAbsPathAfterJunction.Equals(CorrectedCapitalizationAfterJunction, ESearchCase::IgnoreCase))
{
//unexpected but no need for a separate error
// New log
UE_LOG(LogAssetRegistry, Display, TEXT("Junctions: Unexpected difference in relative path after junction point: '%s' != '%s'"), *LocalAbsPathAfterJunction, *CorrectedCapitalizationAfterJunction);
return false;
}
The return true at the bottom of the function must not be reached, because the warning does not fire if it reaches that point.
[Attachment Removed]