Skip to content

Commit 1aece68

Browse files
committed
Correct key setting with empty value
1 parent 12b5f92 commit 1aece68

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Zip/ZipFile.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,8 +192,9 @@ public string Password
192192
{
193193
set
194194
{
195-
if (value == null)
195+
if ( (value == null) || (value.Length == 0) ) {
196196
key = null;
197+
}
197198
else {
198199
key = PkzipClassic.GenerateKeys(Encoding.ASCII.GetBytes(value));
199200
}

0 commit comments

Comments
 (0)