Skip to content
This repository has been archived by the owner on Sep 20, 2018. It is now read-only.

CommonDispose in SevenZipExtractor #3

Open
hoi82 opened this issue Jul 19, 2016 · 2 comments
Open

CommonDispose in SevenZipExtractor #3

hoi82 opened this issue Jul 19, 2016 · 2 comments

Comments

@hoi82
Copy link

hoi82 commented Jul 19, 2016

Line 763, 764 is,

_inStream.Dispose();
_inStream = null;

When I use this class, _inStream is set null, so the error is occured at above lines,
Why don't you check _instream is null?

@DomZZZ
Copy link

DomZZZ commented Sep 12, 2016

I reproduced the exact same issue 👍
Here is my code

                Configuration conf = null;
                using (var extractor = new SevenZip.SevenZipExtractor(uploadedFile))
                {
                    var generalCfgFile = extractor.ArchiveFileNames.FirstOrDefault(f => f.IndexOf(BaseDomainService.GeneralCfgFileName) > -1);
                    using (var ms = new MemoryStream())
                    {
                        extractor.ExtractFile(generalCfgFile, ms);
                        conf = ReadHeaderFromBytes(ms.ToArray());
                    }
                }

@santoshthube
Copy link

I am also facing the same issue.
Can anyone tell how to proceed?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants