Skip to content

Commit 038ff64

Browse files
committed
FileExtractionStarted must be synchronous
1 parent cb1c436 commit 038ff64

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

SevenZip/SevenZip.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<RegisterForComInterop>false</RegisterForComInterop>
1515
</PropertyGroup>
1616
<PropertyGroup>
17-
<Version>1.0.1</Version>
17+
<Version>1.0.2</Version>
1818
</PropertyGroup>
1919
<PropertyGroup Condition="'$(Configuration)'=='Debug'">
2020
<DefineConstants>$(DefineConstants)TRACE;DEBUG;UNMANAGED</DefineConstants>

SevenZip/SevenZipBase.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@ internal void OnEvent<T>(EventHandler<T> handler, T e, bool synchronous) where T
6262
if (synchronous)
6363
{
6464
// Could be just handler(this, e);
65-
Context.Send(callback, new object[] { handler, this, e });
65+
//Context.Send(callback, new object[] { handler, this, e });
66+
handler(this, e);
6667
}
6768
else
6869
{

SevenZip/SevenZipCompressor.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1020,7 +1020,7 @@ private ArchiveOpenCallback GetArchiveOpenCallback()
10201020
/// <param name="e">The event arguments.</param>
10211021
private void FileCompressionStartedEventProxy(object sender, FileNameEventArgs e)
10221022
{
1023-
OnEvent(FileCompressionStarted, e, false);
1023+
OnEvent(FileCompressionStarted, e, true);
10241024
}
10251025

10261026
/// <summary>

SevenZip/SevenZipExtractor.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -885,7 +885,7 @@ private void FileExtractionStartedEventProxy(object sender, FileInfoEventArgs e)
885885
/// <param name="e">The event arguments.</param>
886886
private void FileExtractionFinishedEventProxy(object sender, FileInfoEventArgs e)
887887
{
888-
OnEvent(FileExtractionFinished, e, true);
888+
OnEvent(FileExtractionFinished, e, false);
889889
}
890890

891891
/// <summary>
@@ -1299,7 +1299,7 @@ public void ExtractFiles(ExtractFileCallback extractFileCallback)
12991299

13001300
if (IsSolid)
13011301
{
1302-
throw new SevenZipExtractionFailedException("Solid archives are not supported.");
1302+
//throw new SevenZipExtractionFailedException("Solid archives are not supported.");
13031303
}
13041304

13051305
foreach (var archiveFileInfo in ArchiveFileData)

0 commit comments

Comments
 (0)