| ... | @@ -59,6 +59,8 @@ pub const MAX_NAME_BYTES = switch (builtin.os.tag) { | ... | @@ -59,6 +59,8 @@ pub const MAX_NAME_BYTES = switch (builtin.os.tag) { |
| 59 | // If it would require 4 UTF-8 bytes, then there would be a surrogate | 59 | // If it would require 4 UTF-8 bytes, then there would be a surrogate |
| 60 | // pair in the UTF-16LE, and we (over)account 3 bytes for it that way. | 60 | // pair in the UTF-16LE, and we (over)account 3 bytes for it that way. |
| 61 | .windows => os.windows.NAME_MAX * 3, | 61 | .windows => os.windows.NAME_MAX * 3, |
| | 62 | // TODO work out what a reasonable value we should use here |
| | 63 | .wasi => 1024, |
| 62 | else => if (@hasDecl(root, "os") and @hasDecl(root.os, "NAME_MAX")) | 64 | else => if (@hasDecl(root, "os") and @hasDecl(root.os, "NAME_MAX")) |
| 63 | root.os.NAME_MAX | 65 | root.os.NAME_MAX |
| 64 | else | 66 | else |