Zip inside Zip-File

Nov 8, 2011 at 2:52 PM

Hi community,

i had a problem by reade a zip file on the fly.
I had multiple zip-files inside a zip-file. (here a sample file at a one-click-hoster)

My code so long:

	using (FileStream fs = new FileStream(fileWatchThread.FilePath, FileMode.Open))
                {
                    using (ZipFile zipFile = ZipFile.Read(fs))
                    {
                        foreach (ZipEntry zipEntry in zipFile.Entries)
                        {
                            using(Stream entryStream = zipEntry.OpenReader())
                            {
                                using (ZipInputStream zipStream = new ZipInputStream (entryStream))
                                {                                    
                                    using (XmlTextReader reader = new XmlTextReader(zipStream))
                                    {
                                        int i = 0;

                                        while (reader.Read())
                                        {
                                            if (reader.Name == "row" && reader.NodeType != XmlNodeType.EndElement)
                                            {
                                                i++;
                                                fileWatchThread.DataCount = i;
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
But this dont work :(
Coordinator
Nov 9, 2011 at 1:16 PM

Hmmm, that's too bad.  I wonder what the problem might be?

How do you think you would go about diagnosing a "it doesn't work" situation?  If there is an exception I suppose you;d want to look at a stacktrace, eh?

If there's some other problem, I suppose you'd want to probably understand it better, describe it more thoroughly, so as to communicate the details of the problem to other people who might be able to help you.  

Maybe.