mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
[ZipFile, ZipFileEntry] Add regions for sanity
This commit is contained in:
@@ -111,6 +111,8 @@ namespace SabreTools.Helper
|
||||
|
||||
#endregion
|
||||
|
||||
#region Central Directory
|
||||
|
||||
/// <summary>
|
||||
/// Find the end of the central directory signature
|
||||
/// </summary>
|
||||
@@ -227,6 +229,10 @@ namespace SabreTools.Helper
|
||||
bw.Write(_fileComment, 0, _fileComment.Length);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Zip64 Central Directory
|
||||
|
||||
/// <summary>
|
||||
/// Read the end of the Zip64 central directory
|
||||
/// </summary>
|
||||
@@ -361,6 +367,10 @@ namespace SabreTools.Helper
|
||||
bw.Write((uint)1); // total number of disks
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Open, Create, Close
|
||||
|
||||
/// <summary>
|
||||
/// Open a new file as an archive
|
||||
/// </summary>
|
||||
@@ -737,6 +747,10 @@ namespace SabreTools.Helper
|
||||
_zipOpen = ZipOpenType.Closed;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Read and Write
|
||||
|
||||
/// <summary>
|
||||
/// Open the read file stream
|
||||
/// </summary>
|
||||
@@ -885,6 +899,10 @@ namespace SabreTools.Helper
|
||||
_entries[_entries.Count - 1].AddDirectory();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Helpers
|
||||
|
||||
/// <summary>
|
||||
/// Scan every individual entry for validity
|
||||
/// </summary>
|
||||
@@ -994,5 +1012,7 @@ namespace SabreTools.Helper
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user