aboutsummaryrefslogtreecommitdiff
path: root/std/os
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2018-06-14 16:36:07 -0400
committerAndrew Kelley <superjoe30@gmail.com>2018-06-14 16:36:07 -0400
commitcdf1e366f9c36af111cf41b001a58635d94a7714 (patch)
tree94e9a8f3b0b51e0b51e7b2f443623d7ebf2e1531 /std/os
parent6943cefebf94631ff02d6e28436c07f4030924c6 (diff)
downloadzig-cdf1e366f9c36af111cf41b001a58635d94a7714.tar.gz
zig-cdf1e366f9c36af111cf41b001a58635d94a7714.zip
fix build on windows, broken by previous commit
Diffstat (limited to 'std/os')
-rw-r--r--std/os/index.zig2
1 files changed, 1 insertions, 1 deletions
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)),