Improve zipos path handling (#579)

This change adds opendir, readdir, and stat support for the /zip/ root,
as well as directories not explicitly encoded in the zip file.
This commit is contained in:
Gavin Hayes 2022-09-04 01:50:23 -04:00 committed by GitHub
parent 494d74271b
commit 1ef955c33b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 73 additions and 10 deletions

View file

@ -64,6 +64,10 @@ TEST(stat, zipos) {
stat("/zip/.python/test/"
"tokenize_tests-latin1-coding-cookie-and-utf8-bom-sig.txt",
&st));
EXPECT_SYS(0, 0, stat("/zip", &st));
EXPECT_SYS(0, 0, stat("/zip/", &st));
EXPECT_SYS(0, 0, stat("/zip/.python", &st));
EXPECT_SYS(0, 0, stat("/zip/.python/", &st));
}
static long Stat(const char *path, struct stat *st) {