Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PhysicalFileProvider: Remove second try on GetFileLinkTargetLastWriteTimeUtc #57136

Merged
merged 3 commits into from
Aug 11, 2021
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public static bool IsExcluded(FileSystemInfo fileSystemInfo, ExclusionFilters fi
// If file is a link, and link target does not exists, return DateTime.MinValue
// since the link's LastWriteTimeUtc doesn't convey anything for this scenario.
// If file is not a link, return null to inform the caller that file is not a link.
public static DateTime? GetFileLinkTargetLastWriteTimeUtc(FileInfo fileInfo, bool isSecondTry = false)
public static DateTime? GetFileLinkTargetLastWriteTimeUtc(FileInfo fileInfo)
{
#if NETCOREAPP
Debug.Assert(fileInfo.Exists);
Expand All @@ -63,10 +63,6 @@ public static bool IsExcluded(FileSystemInfo fileSystemInfo, ExclusionFilters fi
{
// The file ceased to exist between LinkTarget and ResolveLinkTarget.
// Try one more time, if it fails again just give up.
danmoseley marked this conversation as resolved.
Show resolved Hide resolved
if (!isSecondTry)
{
GetFileLinkTargetLastWriteTimeUtc(fileInfo, isSecondTry: true);
}
}

return DateTime.MinValue;
Expand Down