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

File named "⚾" is treated as directory #218

Open
reima opened this issue Nov 18, 2020 · 0 comments · May be fixed by #219
Open

File named "⚾" is treated as directory #218

reima opened this issue Nov 18, 2020 · 0 comments · May be fixed by #219

Comments

@reima
Copy link

reima commented Nov 18, 2020

Steps to reproduce

  1. Create a ZIP file with a file named Files/⚾ (i.e. "Files/\u26BE").
  2. Read the ZIP file with DotNetZip.
  3. Get the entry and inspect the IsDirectory property.

Example code

using (var zip = new ZipFile("test.zip", Encoding.UTF8))
{
    zip.AddEntry("Files/\u26BE", new byte[0]);
    zip.Save();
}

using (var zip = ZipFile.Read("test.zip"))
{
    ZipEntry entry = zip["Files/\u26BE"];
    Console.WriteLine("IsDirectory: " + entry.IsDirectory);
}

Expected behavior

The IsDirectory property is false.

Actual behavior

The IsDirectory property is true.

Versions

  • DotNetZip 1.14.0 from nuget.org
  • .NET Framework 4.7.1
@reima reima linked a pull request Nov 18, 2020 that will close this issue
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant