mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
[ZipFile] Use File.OpenRead/OpenWrite
This commit is contained in:
@@ -401,7 +401,7 @@ namespace SabreTools.Helper
|
||||
}
|
||||
|
||||
// Now try to open the file for reading
|
||||
_zipstream = new FileStream(filename, FileMode.Open, FileAccess.Read);
|
||||
_zipstream = File.OpenRead(filename);
|
||||
int read = _zipstream.Read(new byte[1], 0, 1);
|
||||
if (read != 1)
|
||||
{
|
||||
@@ -619,7 +619,7 @@ namespace SabreTools.Helper
|
||||
_zipFileInfo = new FileInfo(filename);
|
||||
|
||||
// Now try to open the file
|
||||
_zipstream = new FileStream(filename, FileMode.Create, FileAccess.ReadWrite);
|
||||
_zipstream = File.OpenWrite(filename);
|
||||
ZipOpen = ZipOpenType.OpenWrite;
|
||||
return ZipReturn.ZipGood;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user