diff --git a/src/Helpers.cs b/src/Helpers.cs index 8519b28..38e4c5c 100644 --- a/src/Helpers.cs +++ b/src/Helpers.cs @@ -314,26 +314,26 @@ public static void ExtractComponent(Stream stream, Component component) string.Join(" ", new[] { component.Hash, $"{component.InstallSize}" }.Concat(component.Depends).ToArray()) }; - if (component.InstallSize == 0) return; - - using (var reader = ZipArchive.Open(stream).ExtractAllEntries()) + if (component.InstallSize != 0) { - while (reader.MoveToNextEntry()) + using (var reader = ZipArchive.Open(stream).ExtractAllEntries()) { - if (reader.Entry.IsDirectory) continue; + while (reader.MoveToNextEntry()) + { + if (reader.Entry.IsDirectory) continue; - string destPath = Path.Combine(Common.Path, component.Directory.Replace('/', Path.DirectorySeparatorChar)); + string destPath = Path.Combine(Common.Path, component.Directory.Replace('/', Path.DirectorySeparatorChar)); - Directory.CreateDirectory(destPath); + Directory.CreateDirectory(destPath); - reader.WriteEntryToDirectory(destPath, new ExtractionOptions - { - ExtractFullPath = true, - Overwrite = true, - PreserveFileTime = true - }); + reader.WriteEntryToDirectory(destPath, new ExtractionOptions { + ExtractFullPath = true, + Overwrite = true, + PreserveFileTime = true + }); - infoContents.Add(Path.Combine(component.Directory, reader.Entry.Key).Replace('/', Path.DirectorySeparatorChar)); + infoContents.Add(Path.Combine(component.Directory, reader.Entry.Key).Replace('/', Path.DirectorySeparatorChar)); + } } }