Improve zip read-only filesystem

readdir() will now always yield an inode that's consistent with stat()
on ZipOS and Windows in general. More APIs have been updated to return
the appropriate error code when inappropriately trying to do ops, like
sockets, with a zip file descriptor. The path normalization algorithms
are now fully fleshed out. Some socket APIs have been fixed so they'll
raise EBADF vs. ENOTSOCK appropriately. Lastly seekdir() will now work
properly on NetBSD and FreeBSD (not sure why anyone would even use it)
This commit is contained in:
Justine Tunney 2023-08-16 15:53:06 -07:00
parent dc6c67256f
commit b76b2be2d0
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
47 changed files with 644 additions and 269 deletions

View file

@ -104,7 +104,6 @@ __msabi static inline char16_t *MyCommandLine(void) {
// this ensures close(1) won't accidentally close(2) for example
__msabi static textwindows void DeduplicateStdioHandles(void) {
int64_t h1, h2, h3, proc;
for (long i = 0; i < 3; ++i) {
int64_t h1 = __imp_GetStdHandle(kNtConsoleHandles[i]);
for (long j = i + 1; j < 3; ++j) {