1
Vote

SevenZipSharp throwing error while handling spanned bz2 & tar files

description

I am trying to extract the spanned bz2 and tar files using SevenZipSharp but it throws the below error

The execution has failed due to the bug in the SevenZipSharp.\nPlease report about it to http://sevenzipsharp.codeplex.com/WorkItem/List.aspx, post the release number and attach the archive."}

at SevenZip.SevenZipBase.ThrowException(CallbackBase handler, Exception[] e)
at SevenZip.SevenZipBase.CheckedExecute(Int32 hresult, String message, CallbackBase handler)
at SevenZip.SevenZipExtractor.ExtractArchive(String directory)
at ConsoleApplication2.Program.ExtractSpannedFile_BZ2() in c:\PrecisionDiscovery\TestDelete\ConsoleApplication2\ConsoleApplication2\Program.cs:line 34
at ConsoleApplication2.Program.Main(String[] args) in c:\PrecisionDiscovery\TestDelete\ConsoleApplication2\ConsoleApplication2\Program.cs:line 18
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()

Here is the code that I use to extract the spanned files


string archivePath = @"C:\7-Zip\SourceTemp\bzip2\Segmented\0___1GB.tar.bz2.001";
        string _targetDirectoryRoot = @"C:\7-Zip\DestinationTemp";
        SevenZipExtractor _sevenZipExtractor;
        ReadOnlyCollection<ArchiveFileInfo> _archive;

        SevenZip.SevenZipCompressor.SetLibraryPath(Path.Combine(Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location), "7z.dll"));
        _sevenZipExtractor = new SevenZipExtractor(archivePath);

        _archive = _sevenZipExtractor.ArchiveFileData;
        _sevenZipExtractor.ExtractArchive(_targetDirectoryRoot);
Any help is appreciated.

comments