drw-rw-rw- (as derived from zip.File.FileHeader.Mode())
What did you see instead?
It appears that the implementation of Reader.Open, specifically fileListEntry.Mode, instead of returning the actual mode contained in fileListEntry.file.FileHeader.Mode, will returns a hardcoded fs.FileMode:
I am guessing, but it seems like this was done since fileListEntry.file can be nil when the directory entry is synthetic, e.g. the zip contains a file without directory files leading to it, see #48084.
If we wanted to hit two birds with one stone, since this would be a clear signal that "the directory file is missing", I think it would be reasonable to: (though it is a breaking change)
so, this is kind of a poor reproducer, since I am using Writer.Create for both the file and directory, thus we are getting a "default" mode, I can happily modify the example to do a full Writer.CreateHeader and set a custom mode, but this seemed like the minimum viable reproducer.
My comment is not that drw-rw-rw- (0o20000000555) is a better or worse file mode than drw-rw-rw- (0o20000000666), but that the zip bytes stored in b define dir/ to have a mode of drw-rw-rw-, thus that is what should be returned by archive/zipfor both Reader.File and Reader.Open.