FWindowsPlatformFile::GetFilenameOnDisk() does not do what its documentation suggests it does

`FWindowsPlatformFile::GetFilenameOnDisk()` uses GetFinalPathNameByHandle, which returns the final path. According to the windows documentation:

A final path is the path that is returned when a path is fully resolved. For example, for a symbolic link named “C:\tmp\mydir” that points to “D:\yourdir”, the final path would be “D:\yourdir”.

The documentation for `IPlatformFile::GetFileNameOnDisk()` says “For case insensitive filesystems, returns the full path of the file with the same case as in the filesystem”. So theoretically, `GetFileNameOnDisk()` should be returning the same path, but with correct casing, instead of the fully resolved canonical path. I’m curious to know if Epic is aware of this discrepancy and if there are any plans to update the Windows implementation to return the actual path with correct casing, rather than the final path.

For context, my project uses a mapped T drive (my computer doesn’t have an actual T drive) and the asset registry is spamming warnings “LogAssetRegistry: Warning: FPathExistence failed to gather correct capitalization from disk for T:\p4\…\<filename>, because GetFilenameOnDisk returned non-matching filename C:\p4\…\<filename>”.

[Attachment Removed]

Steps to Reproduce

  1. Create a mapped T drive (C:\p4\…\FileName.txt -> T:\p4\…\FileName.txt)
  2. Open Unreal Engine from the mapped T drive
  3. There should be logged warnings like: “LogAssetRegistry: Warning: FPathExistence failed to gather correct capitalization from disk for T:\p4\…\FileName.txt, because GetFilenameOnDisk returned non-matching filename C:\p4\…\FileName.txt”
    [Attachment Removed]

Hi Grace, this was been fixed and should be available in the 5.8 release.

Steve

[Attachment Removed]

Hi Grace, I’ve got a fix for this - I’ll be testing it and will let you know how it goes.

Steve

[Attachment Removed]