Introduce COSMOPOLITAN_DISABLE_ZIPOS environ var

This commit is contained in:
Justine Tunney 2023-08-16 21:04:16 -07:00
parent 8d1c81ac9f
commit 04bd488da7
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
2 changed files with 41 additions and 33 deletions

View file

@ -29,6 +29,7 @@ ssize_t __zipos_parseuri(const char *uri, struct ZiposUri *out) {
uri[2] == 'i' && //
uri[3] == 'p' && //
(!uri[4] || uri[4] == '/')) &&
__zipos_get() &&
(len = __zipos_normpath(out->path, uri + 4 + !!uri[4],
sizeof(out->path))) < sizeof(out->path)) {
return (out->len = len);