diff --git a/EpubCore.Cli/EpubCore.Cli.csproj b/EpubCore.Cli/EpubCore.Cli.csproj
index 0d40d9d..e3b7ff1 100644
--- a/EpubCore.Cli/EpubCore.Cli.csproj
+++ b/EpubCore.Cli/EpubCore.Cli.csproj
@@ -10,10 +10,10 @@
../nupkg
EpubCore.Cli
EpubCore Cli
- Copyright 2023
+ Copyright 2025
https://github.com/domingoladron/EpubCore
https://github.com/domingoladron/EpubCore
- 0.9.2.0
+ 0.9.3.0
diff --git a/EpubCore/EpubCore.csproj b/EpubCore/EpubCore.csproj
index 9114acc..53acf20 100644
--- a/EpubCore/EpubCore.csproj
+++ b/EpubCore/EpubCore.csproj
@@ -7,16 +7,16 @@
Chris Laine (domingoladron)
epub epubs book books 2.0 3.0 3.1
EpubCore
- 1.6.1.0
+ 1.6.2.0
A library for reading and writing EPUB files.
https://github.com/domingoladron/EpubCore
- Copyright 2023
- 1.6.1.0
- 1.6.1.0
+ Copyright 2025
+ 1.6.2.0
+ 1.6.2.0
https://github.com/domingoladron/EpubCore
git
README.md
- Adding logic to handle x-application font mime types
+ Fixing bug where too many Epub.Chapters generated
True
MPL-2.0
diff --git a/EpubCore/EpubReader.cs b/EpubCore/EpubReader.cs
index 07b997f..8237f33 100644
--- a/EpubCore/EpubReader.cs
+++ b/EpubCore/EpubReader.cs
@@ -169,7 +169,12 @@ private static List LoadChaptersFromNav(string navAbsolutePath, XEl
{
chapter.SubChapters = LoadChaptersFromNav(navAbsolutePath, li, bookResources, chapter);
}
- result.Add(chapter);
+
+ // If we don't already have a chapter with this absolute path, then add it. Otherwise, ignore it.
+ if (result.FirstOrDefault(x => x.AbsolutePath.Equals(chapter.AbsolutePath)) == null)
+ {
+ result.Add(chapter);
+ }
previous = chapter.SubChapters.Any() ? chapter.SubChapters.Last() : chapter;
}