Skip to content
This repository has been archived by the owner on May 15, 2024. It is now read-only.

Ignore duplicates 2 #180

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .semver
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
:major: 1
:minor: 13
:patch: 4
:patch: 5
:special: ''
:metadata: ''
6 changes: 3 additions & 3 deletions src/SolutionInfo.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
[assembly: AssemblyVersion("1.13.4")]
[assembly: AssemblyFileVersion("1.13.4")]
[assembly: AssemblyInformationalVersion("1.13.4.000000")]
[assembly: AssemblyVersion("1.13.5")]
[assembly: AssemblyFileVersion("1.13.5")]
[assembly: AssemblyInformationalVersion("1.13.5.000000")]
9 changes: 6 additions & 3 deletions src/Zip.Shared/ZipFile.Read.cs
Original file line number Diff line number Diff line change
Expand Up @@ -783,9 +783,12 @@ private static void ReadIntoInstance_Orig(ZipFile zf)
if (zf.Verbose)
zf.StatusMessageTextWriter.WriteLine(" {0}", e.FileName);

zf._entries.Add(e.FileName,e);
if (!zf._entriesInsensitive.ContainsKey(e.FileName))
zf._entriesInsensitive.Add(e.FileName,e);
if (!(zf.IgnoreDuplicateFiles && zf._entries.ContainsKey(e.FileName)))

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could use the private _IgnoreDuplicateFiles here.

{
zf._entries.Add(e.FileName,e);
if (!zf._entriesInsensitive.ContainsKey(e.FileName))
zf._entriesInsensitive.Add(e.FileName,e);
}
firstEntry = false;
}

Expand Down