mirror of
https://github.com/crskycode/GARbro.git
synced 2026-07-08 01:30:18 +08:00
use HasExtension method instead of string.EndsWith.
This commit is contained in:
@@ -68,7 +68,7 @@ namespace GameRes.Formats.NScripter
|
||||
}
|
||||
catch { /* ignore parse errors */ }
|
||||
}
|
||||
if (!file.Name.EndsWith (".ns2", StringComparison.InvariantCultureIgnoreCase))
|
||||
if (!file.Name.HasExtension (".ns2"))
|
||||
return null;
|
||||
|
||||
var password = QueryPassword();
|
||||
|
||||
@@ -105,7 +105,7 @@ namespace GameRes.Formats.NScripter
|
||||
}
|
||||
}
|
||||
catch { /* ignore parse errors */ }
|
||||
if (zero_signature || !file.Name.EndsWith (".nsa", StringComparison.InvariantCultureIgnoreCase))
|
||||
if (zero_signature || !file.Name.HasExtension (".nsa"))
|
||||
return null;
|
||||
|
||||
var password = QueryPassword();
|
||||
@@ -251,7 +251,7 @@ namespace GameRes.Formats.NScripter
|
||||
var header_entry = new NsaEntry { Name = entry.Name };
|
||||
if (Compression.None != ons_options.CompressionType)
|
||||
{
|
||||
if (entry.Name.EndsWith (".bmp", StringComparison.InvariantCultureIgnoreCase))
|
||||
if (entry.Name.HasExtension (".bmp"))
|
||||
header_entry.CompressionType = ons_options.CompressionType;
|
||||
}
|
||||
index_size += 13;
|
||||
|
||||
Reference in New Issue
Block a user