diff --git a/libhac.Nand/DiscUtils.Fat/ClusterStream.cs b/libhac.Nand/DiscUtils.Fat/ClusterStream.cs index c02b015f..97167e58 100644 --- a/libhac.Nand/DiscUtils.Fat/ClusterStream.cs +++ b/libhac.Nand/DiscUtils.Fat/ClusterStream.cs @@ -134,7 +134,7 @@ namespace DiscUtils.Fat if (!TryLoadCurrentCluster()) { - if ((_position == _length || _position == DetectLength()) && !_atEOF) + if ((_position == _length || _position == DetectLength())) { _atEOF = true; return 0; diff --git a/libhac.Nand/DiscUtils.Fat/FileName.cs b/libhac.Nand/DiscUtils.Fat/FileName.cs index 39501203..1e37965c 100644 --- a/libhac.Nand/DiscUtils.Fat/FileName.cs +++ b/libhac.Nand/DiscUtils.Fat/FileName.cs @@ -126,19 +126,19 @@ namespace DiscUtils.Fat public bool Equals(FileName other) { - if (other == null) + if (other is null) { return false; } if (!string.IsNullOrEmpty(LongName) && !string.IsNullOrEmpty(other.LongName)) - return LongName == other.LongName; + return LongName.Equals(other.LongName, StringComparison.InvariantCultureIgnoreCase); return CompareRawNames(this, other) == 0; } public static FileName FromPath(string path, Encoding encoding) { - return new FileName(Utilities.GetFileFromPath(path), encoding, false); + return new FileName(Utilities.GetFileFromPath(path), encoding, true); } public static bool operator ==(FileName a, FileName b)