Arlodotexe / OwlCore.Storage

The most flexible file system abstraction, ever. Built in partnership with the UWP Community.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ZipArchiveFolder fails to identify existing virtual folders

yoshiask opened this issue · comments

The problem

When creating a ReadOnlyZipArchiveFolder or ZipArchiveFolder from an existing ZIP archive, the folder fails to find any virtual folders. This is due to faulty logic in GetVirtualFolders.

The solution

Just check if any entry names except the current entry start with the current path. This should be sufficient in most cases. This method will fail to recognize virtual folders that do not have any content, but there is not much that can be done in that case.