mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-25 20:52:44 +01:00
Properly dispose the file stream
This commit is contained in:
parent
2fd35789ea
commit
5be9671735
@ -22,9 +22,10 @@ namespace Nikse.SubtitleEdit.Logic.VobSub
|
||||
|
||||
public void Open(string fileName)
|
||||
{
|
||||
var fs = new FileStream(fileName, FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
|
||||
Open(fs);
|
||||
fs.Close();
|
||||
using (var fs = new FileStream(fileName, FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
|
||||
{
|
||||
Open(fs);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
Loading…
Reference in New Issue
Block a user