fix linux
* error.BadFd is not a valid error code. it would always be a bug to get this error code. * merge error.Io with existing error.InputOutput * merge error.PathNotFound with existing error.FileNotFound. Not all OS's support both. * add os.File.openReadC * add error.BadPathName for windows file operations with invalid characters * add os.toPosixPath to help stack allocate a null terminating byte * add some TODOs for other functions to investigate removing the allocator requirement * optimize some implementations to use the alternate functions when a null byte is already available * add a missing error.SkipZigTest * os.selfExePath uses a non-allocating API * os.selfExeDirPath uses a non-allocating API * os.path.real uses a non-allocating API * add os.path.realAlloc and os.path.realC * convert many windows syscalls to use the W versions (See #534)
This commit is contained in:
@@ -20,7 +20,7 @@ pub fn main() !void {
|
||||
} else if (arg[0] == '-') {
|
||||
return usage(exe);
|
||||
} else {
|
||||
var file = os.File.openRead(allocator, arg) catch |err| {
|
||||
var file = os.File.openRead(arg) catch |err| {
|
||||
warn("Unable to open file: {}\n", @errorName(err));
|
||||
return err;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user