After: using (var zipStorer = ZipStorer.Open(importPath, FileAccess.Read))
exception is thrown in Open constructor and importPath stream remains open, preventing move/deletion of it later - this fixes that
In ReadFileInfo, I've added check for zip file header 4 bytes check, for faster recognition of non zip files. I am not sure if all zip files have that, that 4 bytes I've taken from https://en.wikipedia.org/wiki/ZIP_(file_format)
Local file header signature = 0x04034b50 (read as a little-endian number)
After: using (var zipStorer = ZipStorer.Open(importPath, FileAccess.Read)) exception is thrown in Open constructor and importPath stream remains open, preventing move/deletion of it later - this fixes that
In ReadFileInfo, I've added check for zip file header 4 bytes check, for faster recognition of non zip files. I am not sure if all zip files have that, that 4 bytes I've taken from https://en.wikipedia.org/wiki/ZIP_(file_format) Local file header signature = 0x04034b50 (read as a little-endian number)