We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6943cef commit cdf1e36Copy full SHA for cdf1e36
std/os/index.zig
@@ -1971,7 +1971,7 @@ pub fn selfExeDirPath(allocator: *mem.Allocator) ![]u8 {
1971
Os.windows, Os.macosx, Os.ios => {
1972
const self_exe_path = try selfExePath(allocator);
1973
errdefer allocator.free(self_exe_path);
1974
- const dirname = os.path.dirname(self_exe_path);
+ const dirname = os.path.dirname(self_exe_path) orelse ".";
1975
return allocator.shrink(u8, self_exe_path, dirname.len);
1976
},
1977
else => @compileError("unimplemented: std.os.selfExeDirPath for " ++ @tagName(builtin.os)),
0 commit comments