You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
set its NameTransform property to an INameTransform implementation
execute its CreateZip method to create a zip file
Expected behavior
The configured name transform is used for the zip file creation.
Actual behavior
The configured name provider is ignored; CreateZip always sets it to a new ZipNameTransform instance.
If this is the intent, perhaps the documentation should better reflect this, and the setter should then probably be private (or protected, given that FastZip isn't sealed).
Note: the same happens if you set the EntryFactory to a custom entry factory with a custom name transform - CreateZip happily changes the factory's name transform. That sounds like highly irregular behavior.
Version of SharpZipLib
1.0
Obtained from (place an x between the brackets for all that apply)
Package installed using:
NuGet
The text was updated successfully, but these errors were encountered:
Yes, that does seem counter-intuitive. CreateZip should use the backing field (entryFactory_.NameTransform) if it's not null or otherwise create a new a new instance the same way that it does right now. My guess is that CreateZip is meant to be used as a shortcut, when you only want the most basic behaviour. But then I guess it should either be static or clearly separated from the rest of the class.
Steps to reproduce
FastZip
instanceNameTransform
property to anINameTransform
implementationCreateZip
method to create a zip fileExpected behavior
The configured name transform is used for the zip file creation.
Actual behavior
The configured name provider is ignored;
CreateZip
always sets it to a newZipNameTransform
instance.If this is the intent, perhaps the documentation should better reflect this, and the setter should then probably be
private
(orprotected
, given thatFastZip
isn't sealed).Note: the same happens if you set the
EntryFactory
to a custom entry factory with a custom name transform -CreateZip
happily changes the factory's name transform. That sounds like highly irregular behavior.Version of SharpZipLib
1.0
Obtained from (place an x between the brackets for all that apply)
The text was updated successfully, but these errors were encountered: