mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
[ALL] Stop using "using" for everything except databases
This commit is contained in:
@@ -610,10 +610,9 @@ namespace SabreTools.Helper
|
||||
{
|
||||
// Read the BOM
|
||||
var bom = new byte[4];
|
||||
using (var file = new FileStream(filename, FileMode.Open, FileAccess.Read))
|
||||
{
|
||||
file.Read(bom, 0, 4);
|
||||
}
|
||||
FileStream file = File.OpenRead(filename);
|
||||
file.Read(bom, 0, 4);
|
||||
file.Dispose();
|
||||
|
||||
// Analyze the BOM
|
||||
if (bom[0] == 0x2b && bom[1] == 0x2f && bom[2] == 0x76) return Encoding.UTF7;
|
||||
|
||||
Reference in New Issue
Block a user