Skip to content

Commit

Permalink
Avoid NullRef if ResolveLinkTarget returns null (#57235)
Browse files Browse the repository at this point in the history
  • Loading branch information
jozkee authored Aug 12, 2021
1 parent 88b3ebf commit e0f6071
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public static bool IsExcluded(FileSystemInfo fileSystemInfo, ExclusionFilters fi
try
{
FileSystemInfo targetInfo = fileInfo.ResolveLinkTarget(returnFinalTarget: true);
if (targetInfo.Exists)
if (targetInfo != null && targetInfo.Exists)
{
return targetInfo.LastWriteTimeUtc;
}
Expand Down

0 comments on commit e0f6071

Please sign in to comment.