Closed brettsimons closed 5 months ago
Hi @Plecra, I believe this topic was touched on previously in #249 and #366 but I wanted to propose this change which leverages the ZipFile is_dir function instead of explicitly getting the file name and checking for the path separator. This helps keep the directory check consistent and fixes the issue of zip files created on Windows where the ending path separator is '\' instead of '/' since is_dir already supports both scenarios.
This repo is no longer maintained, so I've replaced this PR with https://github.com/zip-rs/zip2/pull/52.
The directory check inside the extract function fails if the path uses the Windows style path separator and not the Unix style. A function "is_dir" already exists and accounts for this so this change switches to using that function instead.