Recent change to handle symbolic links in Utils.cs does not handle Windows deduplication

Hi there.

We started seeing the following intermittent failure when building:

SafeCopyFile Exception was Exception in AutomationUtils.Automation: Object reference not set to an instance of an object.

Debugging it showed that it was due to this recent change not accounting for Windows Data Deduplication.

Deduplicated files get reparse points with tag 0x80000013 (IO_REPARSE_TAG_DEDUP), but they are not symbolic links. ResolveLinkTarget returns null for deduplicated files.

Adding a null check to the code at line 515 of Utils.cs to the following would fix the issue:

                        if (SourceInfo.Attributes.HasFlag(FileAttributes.ReparsePoint))
                        {
                            var ResolvedInfo = SourceInfo.ResolveLinkTarget(true);
                            if (ResolvedInfo != null)
                            {
                                SourceInfo = (FileInfo)ResolvedInfo;
                            }
                        }

Thanks,

Malcolm

[Attachment Removed]

Steps to Reproduce
This is an intermittent build issue that occurs when the host Windows machine has Data Deduplication enabled. It will occur if the source file of a SafeCopyFile operation gets deduplicated. I’m not sure how to force that.

[Attachment Removed]

Thanks, I’ll see about getting this into the next hotfix.

[Attachment Removed]

This will be in the 5.7.4 hotfix and should be in ue5-main next week.

[Attachment Removed]