From 51023c8a61d3dead02f2e418a102a2e0a517d5c6 Mon Sep 17 00:00:00 2001 From: bcssov Date: Wed, 30 Nov 2022 05:37:22 +0100 Subject: [PATCH] Fix compress merge failing due to bad file listing including directories --- src/IronyModManager.IO/Readers/ArchiveFileReader.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/IronyModManager.IO/Readers/ArchiveFileReader.cs b/src/IronyModManager.IO/Readers/ArchiveFileReader.cs index 05ab8352..067de52c 100644 --- a/src/IronyModManager.IO/Readers/ArchiveFileReader.cs +++ b/src/IronyModManager.IO/Readers/ArchiveFileReader.cs @@ -4,7 +4,7 @@ // Created : 02-23-2020 // // Last Modified By : Mario -// Last Modified On : 11-06-2022 +// Last Modified On : 11-30-2022 // *********************************************************************** // // Mario @@ -97,8 +97,11 @@ public virtual IEnumerable GetFiles(string path) var files = new List(); foreach (var entry in zip.EntryFileNames) { - var relativePath = entry.StandardizeDirectorySeparator().Trim(Path.DirectorySeparatorChar); - files.Add(relativePath); + if (!zip[entry].IsDirectory) + { + var relativePath = entry.StandardizeDirectorySeparator().Trim(Path.DirectorySeparatorChar); + files.Add(relativePath); + } } return files; }