diff --git a/CycloneDX/Services/NugetV3Service.cs b/CycloneDX/Services/NugetV3Service.cs index 923eba4d..5fdfb040 100644 --- a/CycloneDX/Services/NugetV3Service.cs +++ b/CycloneDX/Services/NugetV3Service.cs @@ -80,11 +80,12 @@ internal string GetCachedNuspecFilename(string name, string version) if (string.IsNullOrEmpty(name) || string.IsNullOrEmpty(version)) { return null; } var lowerName = name.ToLowerInvariant(); + var lowerVersion = version.ToLowerInvariant(); string nuspecFilename = null; foreach (var packageCachePath in _packageCachePaths) { - var currentDirectory = _fileSystem.Path.Combine(packageCachePath, lowerName, NormalizeVersion(version)); + var currentDirectory = _fileSystem.Path.Combine(packageCachePath, lowerName, NormalizeVersion(lowerVersion)); var currentFilename = _fileSystem.Path.Combine(currentDirectory, lowerName + _nuspecExtension); if (_fileSystem.File.Exists(currentFilename)) {