Opened 9 years ago
Closed 9 years ago
#5758 closed defect (invalid)
VSIArchiveFilesystemHandler::Stat() setting st_mode to S_IFREG has consequences for higher level functions
Reported by: | hchen | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | default | Version: | unspecified |
Severity: | normal | Keywords: | |
Cc: |
Description
VSIArchiveFilesystemHandler::Stat() (lines 498 to 510) in port/cpl_vsil_abstract_archive.cpp will set the st_mode of an archive to S_IFREG if it only contains one file. This affects other functions (e.g. os.path.isdir() in Python will return false for a zip accessed using the /vsizip/ virtual file system if it only contains one file). Is this the intended behaviour?
Attachments (1)
Change History (3)
by , 9 years ago
Attachment: | excerpt.cpp added |
---|
comment:1 by , 9 years ago
Yes, this is meant as a convenience. For example if I have byte.tif.zip that contains only byte.tif, I can directly do "gdalinfo /vsizip/byte.tif.zip" (I can do also gdalinfo /vzizip/byte.tif.zip/byte.tif", but that's longer to type).
comment:2 by , 9 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
Closing as no feedback and I don't see any particular issue.
Relevant excerpt from VSIArchiveFilesystemHandler::Stat()