I am using SLSharpZipLib in my Silverlight application.
Where I am also trying to delete 1 or 2 files from Zip without unzipping it.
I have written below code to achieve the same :
Stream stream = dialog.File.OpenRead();
ZipFile z = new ZipFile(stream);
bool state= z.Delete(directoryname + "test.txt");
Here Delete method also returns me true value. But when CommitUpdate is executed I get exception that "Stream does not support writing.
at System.IO.FileStream.WriteByte(Byte value)
at ICSharpCode.SharpZipLib.Zip.ZipFile.WriteLEShort(Int32 value)
at ICSharpCode.SharpZipLib.Zip.ZipFile.WriteLEInt(Int32 value)
at ICSharpCode.SharpZipLib.Zip.ZipFile.WriteLocalEntryHeader(ZipUpdate update)
at ICSharpCode.SharpZipLib.Zip.ZipFile.CopyEntryDirect(ZipFile workFile, ZipUpdate update, Int64& destinationPosition)
Is there anything that I am missed out?
Please help asap.