This project is read-only.
1
Vote

Bad signature (0x6F9E597E) at position 0x00AF8F62

description

The error is coming at the moment when i make --> input.GetNextEntry() by Extracting from this ZIP

https://www.dropbox.com/s/k8my8amsunxl6m7/Erste%20Schritte%20mit%20Dropbox.pdf?dl=0

Can anybody help me?

my code for extracting:
            byte[] buffer = new byte[2048];
            int n;

            using (var raw = File.Open(zipFilePath, FileMode.Open, FileAccess.Read))
            {
                using (var input = new ZipInputStream(raw))
                {
                    if (!string.IsNullOrEmpty(password))
                        input.Password = password;

                    ZipEntry entry;

                    while ((entry = input.GetNextEntry()) != null)
                    {
                        if (entry.IsDirectory) continue;

                        string outputPath = Path.Combine(targetPath, entry.FileName.Split(new []{ '/'}).Last());

                        using (var output = File.Open(outputPath, FileMode.Create, FileAccess.ReadWrite))
                        {
                            while ((n = input.Read(buffer, 0, buffer.Length)) > 0)
                            {
                                output.Write(buffer, 0, n);
                            }
                        }
                    }
                }
            }

comments