Closed fawick closed 7 years ago
IMHO OpenZip
could still require that there is exactly one shapefile within the archive and return an error if that is not the case (0 or 2+ shapefiles) This would take care of the problem that the wrong file is returned to the user.
Another function OpenZipWithName(path, archivedPath)
could offer the possibility to load a specified shapefiles from archives that hold one or more shapefiles.
@tdilo What do you think?
Sounds good. This begs the question whether listing of valid shapefile names should be supported as well.
@tdilo Thx for the review, pls take another look.
(idea originally by @tdilo)
At the moment
OpenZip
assumes that the shapefile lies in the root of the archived filetree and has the same basename as the archive file.The idea is to lift the restriction by scanning through the archive and using the relative path and basename of the first found shapefile.