ClearCanvas/ClearCanvas — pull request #99 by teleivo (2014-02-05 15:19:04+00:00)
Title: Update SharpZipWriter.cs to get non-empty zip files

"Archive Application Log" Service creates empty zip files on the filesystem due to:

- entry being null
_zipFile hasnt been updated with _zipFile.CommitUpdate() yet. Exception "Cannot find central directory" is then thrown by setting entry.Comment

- MemoryStream sourceFile.Position being at its end
thus sourceFile.Read(buffer, 0, readSize) returns 0 Bytes and nothing is written into the ApplicationLog zipfile. Exception "Failed to copy bytes expected xx read 0" is thrown by _zipFile.CommitUpdate() at ICSharpCode.SharpZipLib.Zip.ZipFile.CopyBytes