From cdf1e366f9c36af111cf41b001a58635d94a7714 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Thu, 14 Jun 2018 16:36:07 -0400 Subject: [PATCH] fix build on windows, broken by previous commit --- std/os/index.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/std/os/index.zig b/std/os/index.zig index 46f5e76d98..62eeb7e43e 100644 --- a/std/os/index.zig +++ b/std/os/index.zig @@ -1971,7 +1971,7 @@ pub fn selfExeDirPath(allocator: *mem.Allocator) ![]u8 { Os.windows, Os.macosx, Os.ios => { const self_exe_path = try selfExePath(allocator); errdefer allocator.free(self_exe_path); - const dirname = os.path.dirname(self_exe_path); + const dirname = os.path.dirname(self_exe_path) orelse "."; return allocator.shrink(u8, self_exe_path, dirname.len); }, else => @compileError("unimplemented: std.os.selfExeDirPath for " ++ @tagName(builtin.os)),