Skip to content
Merged
Changes from all 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 @@ -254,6 +254,11 @@
/// <returns>True if path is valid, otherwise it retuns false. </returns>
private bool IsValidPath(string potentialPath)
{
if (potentialPath == null)
{
return false;

Check warning on line 259 in src/Microsoft.ComponentDetection.Detectors/nuget/NuGetComponentDetector.cs

View check run for this annotation

Codecov / codecov/patch

src/Microsoft.ComponentDetection.Detectors/nuget/NuGetComponentDetector.cs#L258-L259

Added lines #L258 - L259 were not covered by tests
}

FileInfo fileInfo = null;

try
Expand All @@ -265,11 +270,6 @@
return false;
}

if (potentialPath == null)
{
return false;
}

return fileInfo.Exists || fileInfo.Directory.Exists;
}
}
Loading