[ZIpFile, ZipFileEntry] Finish porting over code from RV

This commit is contained in:
Matt Nadareski
2016-09-15 15:57:37 -07:00
parent eb9e61d918
commit 1803eb1ab8
8 changed files with 1039 additions and 31 deletions

View File

@@ -49,12 +49,12 @@ namespace SabreTools.Helper
// If the archive doesn't exist, create it
if (!File.Exists(archiveFileName))
{
outarchive = ZipFile.Open(archiveFileName, ZipArchiveMode.Create);
outarchive = System.IO.Compression.ZipFile.Open(archiveFileName, ZipArchiveMode.Create);
outarchive.Dispose();
}
// Open the archive for writing
using (outarchive = ZipFile.Open(archiveFileName, ZipArchiveMode.Update))
using (outarchive = System.IO.Compression.ZipFile.Open(archiveFileName, ZipArchiveMode.Update))
{
// If the archive doesn't already contain the entry, add it
if (outarchive.GetEntry(rom.Name) == null)
@@ -63,7 +63,7 @@ namespace SabreTools.Helper
}
// If there's a Date attached to the rom, change the entry to that Date
if (!String.IsNullOrEmpty(rom.Date))
if (!string.IsNullOrEmpty(rom.Date))
{
DateTimeOffset dto = DateTimeOffset.Now;
if (DateTimeOffset.TryParse(rom.Date, out dto))