| author | |
| committer | |
| log | 4b47e978e39311c5d8ce86256c2cc6b480af53ff |
| tree | c4fef4685cb741a3c4c34edb51372e4e1491bc5d |
| parent | d80cfa6f41b358440cc0ed021deaa01583a035d7 |
| signature |
2 files changed, 3 insertions(+), 0 deletions(-)
lib/std/os/windows.zig+1| ... | @@ -1913,6 +1913,7 @@ pub fn CreateProcessW( | ... | @@ -1913,6 +1913,7 @@ pub fn CreateProcessW( |
| 1913 | switch (GetLastError()) { | 1913 | switch (GetLastError()) { |
| 1914 | .FILE_NOT_FOUND => return error.FileNotFound, | 1914 | .FILE_NOT_FOUND => return error.FileNotFound, |
| 1915 | .PATH_NOT_FOUND => return error.FileNotFound, | 1915 | .PATH_NOT_FOUND => return error.FileNotFound, |
| 1916 | .DIRECTORY => return error.FileNotFound, | ||
| 1916 | .ACCESS_DENIED => return error.AccessDenied, | 1917 | .ACCESS_DENIED => return error.AccessDenied, |
| 1917 | .INVALID_PARAMETER => unreachable, | 1918 | .INVALID_PARAMETER => unreachable, |
| 1918 | .INVALID_NAME => return error.InvalidName, | 1919 | .INVALID_NAME => return error.InvalidName, |
test/standalone/windows_spawn/main.zig+2| ... | @@ -51,6 +51,8 @@ pub fn main() anyerror!void { | ... | @@ -51,6 +51,8 @@ pub fn main() anyerror!void { |
| 51 | try testExec(allocator, "HeLLo.exe", "hello from exe\n"); | 51 | try testExec(allocator, "HeLLo.exe", "hello from exe\n"); |
| 52 | // without extension should find the .exe (case insensitive) | 52 | // without extension should find the .exe (case insensitive) |
| 53 | try testExec(allocator, "heLLo", "hello from exe\n"); | 53 | try testExec(allocator, "heLLo", "hello from exe\n"); |
| 54 | // with invalid cwd | ||
| 55 | try std.testing.expectError(error.FileNotFound, testExecWithCwd(allocator, "hello.exe", "missing_dir", "")); | ||
| 54 | 56 | ||
| 55 | // now add a .bat | 57 | // now add a .bat |
| 56 | try tmp.dir.writeFile(.{ .sub_path = "hello.bat", .data = "@echo hello from bat" }); | 58 | try tmp.dir.writeFile(.{ .sub_path = "hello.bat", .data = "@echo hello from bat" }); |