mirror of
https://github.com/ziglang/zig.git
synced 2026-02-13 04:48:20 +00:00
windows returns EINVAL for fopen when there is an asterisk in the name
closes #508
This commit is contained in:
parent
22dd0db9bf
commit
c59ce046a0
@ -42,6 +42,7 @@ const char *err_str(Error err) {
|
||||
case ErrorUnknownArchitecture: return "unrecognized architecture";
|
||||
case ErrorUnknownOperatingSystem: return "unrecognized operating system";
|
||||
case ErrorUnknownABI: return "unrecognized C ABI";
|
||||
case ErrorInvalidFilename: return "invalid filename";
|
||||
}
|
||||
return "(invalid error)";
|
||||
}
|
||||
|
||||
@ -44,6 +44,7 @@ enum Error {
|
||||
ErrorUnknownArchitecture,
|
||||
ErrorUnknownOperatingSystem,
|
||||
ErrorUnknownABI,
|
||||
ErrorInvalidFilename,
|
||||
};
|
||||
|
||||
const char *err_str(Error err);
|
||||
|
||||
@ -1099,7 +1099,7 @@ Error os_fetch_file_path(Buf *full_path, Buf *out_contents, bool skip_shebang) {
|
||||
case EINTR:
|
||||
return ErrorInterrupted;
|
||||
case EINVAL:
|
||||
zig_unreachable();
|
||||
return ErrorInvalidFilename;
|
||||
case ENFILE:
|
||||
case ENOMEM:
|
||||
return ErrorSystemResources;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user