Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Yishai Galatzer committed Oct 26, 2015
1 parent 9ec67ca commit ad10dae
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
10 changes: 5 additions & 5 deletions src/Core/Packages/Constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public static class Constants
/// Represents the ".nupkg" extension.
/// </summary>
public static readonly string PackageExtension = ".nupkg";

/// <summary>
/// Represents the ".nuspec" extension.
/// </summary>
Expand Down Expand Up @@ -64,10 +64,10 @@ public static class Constants
public static readonly DateTimeOffset Unpublished = new DateTimeOffset(1900, 1, 1, 0, 0, 0, TimeSpan.FromHours(-8));

[System.Diagnostics.CodeAnalysis.SuppressMessage(
"Microsoft.Security",
"CA2104:DoNotDeclareReadOnlyMutableReferenceTypes",
Justification="The type is immutable.")]
public static readonly ICollection<string> AssemblyReferencesExtensions
"Microsoft.Security",
"CA2104:DoNotDeclareReadOnlyMutableReferenceTypes",
Justification = "The type is immutable.")]
public static readonly ICollection<string> AssemblyReferencesExtensions
= new ReadOnlyCollection<string>(new string[] { ".dll", ".exe", ".winmd" });

public static readonly Version NuGetVersion = typeof(IPackage).Assembly.GetName().Version;
Expand Down
3 changes: 2 additions & 1 deletion src/Core/Repositories/LocalPackageRepository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ internal virtual IPackage OpenPackage(string path)
return null;
}

if (Path.GetExtension(path) == Constants.PackageExtension)
if (string.Equals(Path.GetExtension(path), Constants.PackageExtension, StringComparison.OrdinalIgnoreCase))
{
OptimizedZipPackage package;
try
Expand All @@ -366,6 +366,7 @@ internal virtual IPackage OpenPackage(string path)
{
throw new InvalidDataException(String.Format(CultureInfo.CurrentCulture, NuGetResources.ErrorReadingPackage, path), ex);
}

// Set the last modified date on the package
package.Published = FileSystem.GetLastModified(path);

Expand Down

0 comments on commit ad10dae

Please sign in to comment.